Skip to main content

value_matches_type

Function value_matches_type 

Source
pub fn value_matches_type(value: &Value, ty: &DataType) -> bool
Expand description

Whether a host Value satisfies a declared parameter type.

any (candela’s DataType::Unknown) accepts every value except an enum; a union accepts a value any member accepts; an unparameterised array or map accepts any array or map, because the element type was never pinned. Paired with is_host_callable_type, which decides which parameter types reach here at all.