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: TypeMismatchError
Underlying error
HeterogeneousSet
Found a set whose elements don’t all have the same type. This doesn’t match any possible schema.
Fields
err: HeterogeneousSetError
Underlying 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>
ReportHandler
s 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_code
source§fn source_code(&self) -> Option<&dyn SourceCode>
fn source_code(&self) -> Option<&dyn SourceCode>
Diagnostic
’s Diagnostic::labels
to.Diagnostic
s.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