Skip to main content

shape_mismatch_detail

Function shape_mismatch_detail 

Source
pub fn shape_mismatch_detail(
    expected: &TypeExpr,
    actual: &TypeExpr,
) -> Option<String>
Expand description

Format a type expression for display in error messages. Produce a detail string describing why a Shape type is incompatible with another Shape type — e.g. “missing field ‘age’ (int)” or “field ‘name’ has type int, expected string”. Returns None if both types are not shapes.