Module conformance

Source
Expand description

Module for checking that entities conform with a schema

Modules§

err
This module cotnains errors around entities not conforming to schemas

Structs§

EntitySchemaConformanceChecker
Struct used to check whether entities conform to a schema

Enums§

TypecheckError
Errors returned by typecheck_value_against_schematype() and typecheck_restricted_expr_against_schematype()

Functions§

typecheck_restricted_expr_against_schematype
Check whether the given RestrictedExpr is a valid instance of SchemaType. We do not have type information for unknowns, so this function liberally treats unknowns as implementing any schema type. If the typecheck passes, return Ok(()). If the typecheck fails, return an appropriate Err.
typecheck_value_against_schematype
Check whether the given PartialValue typechecks with the given SchemaType. If the typecheck passes, return Ok(()). If the typecheck fails, return an appropriate Err.