pub enum EntitySchemaConformanceError {
UnexpectedEntityAttr {
uid: EntityUID,
attr: SmolStr,
},
MissingRequiredEntityAttr {
uid: EntityUID,
attr: SmolStr,
},
TypeMismatch {
uid: EntityUID,
attr: SmolStr,
err: TypeMismatchError,
},
HeterogeneousSet {
uid: EntityUID,
attr: SmolStr,
err: HeterogeneousSetError,
},
InvalidAncestorType {
uid: EntityUID,
ancestor_ty: Box<EntityType>,
},
UnexpectedEntityType {
uid: EntityUID,
suggested_types: Vec<EntityType>,
},
UndeclaredAction {
uid: EntityUID,
},
ActionDeclarationMismatch {
uid: EntityUID,
},
ExtensionFunctionLookup {
uid: EntityUID,
attr: SmolStr,
err: ExtensionFunctionLookupError,
},
}
Expand description
Errors raised when entities do not conform to the schema
Variants§
UnexpectedEntityAttr
Fields
Encountered attribute that shouldn’t exist on entities of this type
MissingRequiredEntityAttr
Fields
Didn’t encounter attribute that should exist
TypeMismatch
Fields
err: TypeMismatchError
Underlying error
The given attribute on the given entity had a different type than the schema indicated
HeterogeneousSet
Fields
err: HeterogeneousSetError
Underlying error
Found a set whose elements don’t all have the same type. This doesn’t match any possible schema.
InvalidAncestorType
Fields
ancestor_ty: Box<EntityType>
Ancestor type which was invalid
Found an ancestor of a type that’s not allowed for that entity
UnexpectedEntityType
Fields
suggested_types: Vec<EntityType>
Suggested similar entity types that actually are declared in the schema (if any)
Encountered an entity of a type which is not declared in the schema. Note that this error is only used for non-Action entity types.
UndeclaredAction
Encountered an action which was not declared in the schema
ActionDeclarationMismatch
Encountered an action whose definition doesn’t precisely match the schema’s declaration of that action
ExtensionFunctionLookup
Fields
err: ExtensionFunctionLookupError
Underlying error
Error looking up an extension function. This error can occur when checking entity conformance because that may require getting information about any extension functions referenced in entity attribute values.