Skip to main content

debug_compound_cell

Function debug_compound_cell 

Source
pub fn debug_compound_cell(sheet: &Sheet, id: CellId) -> Result<String>
Expand description

Formats a canonical compound cell at the checked host boundary.

This also supports hosts that retain the underlying adam_rs::Sheet.

§Errors

Rejects an unknown cell, concrete leaf storage, or absent debug capability.

  • Complexity: O(v + s) for v contained values and s output bytes.

§Examples

let parsed = adam_lang::AdamParser::new(adam_lang::TypeRegistry::new(), cel_parser::OpLookup::new())
    .parse_str("sheet s { cell point: (i32, i32) = (3, 4); }").unwrap();
assert_eq!(adam_lang::debug_compound_cell(&parsed.sheet, parsed.cell_names["point"].0).unwrap(), "(3, 4)");