Skip to main content

param_type_matches

Function param_type_matches 

Source
pub fn param_type_matches(expected: &DataType, received: &DataType) -> bool
Expand description

Whether an argument of type received satisfies a parameter declared as expected.

Unknown is the any slot and the type of a value the checker cannot pin down (a json::parse result, for instance). It stands in for every type on either side, so annotating a parameter any keeps the parameter dynamic and passing a dynamic value to a typed parameter is still allowed. Every other pair uses the ordinary type equality.