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(UnexpectedEntityTypeError),
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: TypeMismatchErrorUnderlying error
The given attribute on the given entity had a different type than the schema indicated
HeterogeneousSet
Fields
err: HeterogeneousSetErrorUnderlying 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(UnexpectedEntityTypeError)
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: ExtensionFunctionLookupErrorUnderlying 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.
Trait Implementations§
source§impl Debug for EntitySchemaConformanceError
impl Debug for EntitySchemaConformanceError
source§impl Diagnostic for EntitySchemaConformanceError
impl Diagnostic for EntitySchemaConformanceError
source§fn code(&self) -> Option<Box<dyn Display + '_>>
fn code(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Ideally also globally unique, and documented
in the toplevel crate’s documentation for easy searching. Rust path
format (foo::bar::baz) is recommended, but more classic codes like
E0123 or enums will work just fine.source§fn help(&self) -> Option<Box<dyn Display + '_>>
fn help(&self) -> Option<Box<dyn Display + '_>>
Diagnostic. Do you have any
advice for the poor soul who’s just run into this issue?source§fn severity(&self) -> Option<Severity>
fn severity(&self) -> Option<Severity>
ReportHandlers to change the display format
of this diagnostic. Read moresource§fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
fn labels(&self) -> Option<Box<dyn Iterator<Item = LabeledSpan> + '_>>
Diagnostic’s Diagnostic::source_codesource§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic’s Diagnostic::labels to.Diagnostics.source§fn url(&self) -> Option<Box<dyn Display + '_>>
fn url(&self) -> Option<Box<dyn Display + '_>>
Diagnostic.