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
Encountered attribute that shouldn’t exist on entities of this type
Fields
MissingRequiredEntityAttr
Didn’t encounter attribute that should exist
Fields
TypeMismatch
The given attribute on the given entity had a different type than the schema indicated
Fields
err: TypeMismatchErrorUnderlying error
HeterogeneousSet
Found a set whose elements don’t all have the same type. This doesn’t match any possible schema.
Fields
err: HeterogeneousSetErrorUnderlying error
InvalidAncestorType
Found an ancestor of a type that’s not allowed for that entity
Fields
ancestor_ty: Box<EntityType>Ancestor type which was invalid
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
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.Source§fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
fn diagnostic_source(&self) -> Option<&dyn Diagnostic>
Source§impl Error for EntitySchemaConformanceError
impl Error for EntitySchemaConformanceError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<EntitySchemaConformanceError> for EntitiesError
impl From<EntitySchemaConformanceError> for EntitiesError
Source§fn from(source: EntitySchemaConformanceError) -> Self
fn from(source: EntitySchemaConformanceError) -> Self
Source§impl From<UnexpectedEntityTypeError> for EntitySchemaConformanceError
impl From<UnexpectedEntityTypeError> for EntitySchemaConformanceError
Source§fn from(source: UnexpectedEntityTypeError) -> Self
fn from(source: UnexpectedEntityTypeError) -> Self
Auto Trait Implementations§
impl Freeze for EntitySchemaConformanceError
impl RefUnwindSafe for EntitySchemaConformanceError
impl Send for EntitySchemaConformanceError
impl Sync for EntitySchemaConformanceError
impl Unpin for EntitySchemaConformanceError
impl UnwindSafe for EntitySchemaConformanceError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more