pub enum SchemaError {
Show 20 variants
Serde(Error),
ActionTransitiveClosure(Box<TcError<EntityUID>>),
EntityTypeTransitiveClosure(TcError<Name>),
UnsupportedFeature(UnsupportedFeature),
UndeclaredEntityTypes(HashSet<String>),
UndeclaredActions(HashSet<String>),
UndeclaredCommonTypes(HashSet<String>),
DuplicateEntityType(String),
DuplicateAction(String),
DuplicateCommonType(String),
CycleInActionHierarchy,
EntityTypeParseError(ParseErrors),
NamespaceParseError(ParseErrors),
ExtensionTypeParseError(ParseErrors),
CommonTypeParseError(ParseErrors),
ActionEntityTypeDeclared,
ActionHasAttributes(Vec<String>),
ContextOrShapeNotRecord(ContextOrShape),
ActionAttributesContainEmptySet(EntityUID),
UnsupportedActionAttributeType(EntityUID),
}
Variants§
Serde(Error)
Error thrown by the serde_json
crate during deserialization
ActionTransitiveClosure(Box<TcError<EntityUID>>)
Errors occurring while computing or enforcing transitive closure on action hierarchy.
EntityTypeTransitiveClosure(TcError<Name>)
Errors occurring while computing or enforcing transitive closure on entity type hierarchy.
UnsupportedFeature(UnsupportedFeature)
Error generated when processing a schema file that uses unsupported features
UndeclaredEntityTypes(HashSet<String>)
Undeclared entity type(s) used in the memberOf
field of an entity
type, the appliesTo
fields of an action, or an attribute type in a
context or entity attribute record. Entity types in the error message
are fully qualified, including any implicit or explicit namespaces.
UndeclaredActions(HashSet<String>)
Undeclared action(s) used in the memberOf
field of an action.
UndeclaredCommonTypes(HashSet<String>)
Undeclared common type(s) used in entity or context attributes.
DuplicateEntityType(String)
Duplicate specifications for an entity type. Argument is the name of the duplicate entity type.
DuplicateAction(String)
Duplicate specifications for an action. Argument is the name of the duplicate action.
DuplicateCommonType(String)
Duplicate specification for a reusable type declaration.
CycleInActionHierarchy
Cycle in the schema’s action hierarchy.
EntityTypeParseError(ParseErrors)
Parse errors occurring while parsing an entity type.
NamespaceParseError(ParseErrors)
Parse errors occurring while parsing a namespace identifier.
ExtensionTypeParseError(ParseErrors)
Parse errors occurring while parsing an extension type.
CommonTypeParseError(ParseErrors)
Parse errors occurring while parsing the name of one of reusable declared types.
ActionEntityTypeDeclared
The schema file included an entity type Action
in the entity type
list. The Action
entity type is always implicitly declared, and it
cannot currently have attributes or be in any groups, so there is no
purposes in adding an explicit entry.
ActionHasAttributes(Vec<String>)
One or more action entities are declared with attributes
, but this is
not currently supported.
ContextOrShapeNotRecord(ContextOrShape)
context
or shape
fields are not records
ActionAttributesContainEmptySet(EntityUID)
An action entity (transitively) has an attribute that is an empty set.
This error variant should only be used when PermitAttributes
is enabled.
UnsupportedActionAttributeType(EntityUID)
An action entity (transitively) has an attribute of unsupported type (ExprEscape
, EntityEscape
or ExtnEscape
).
This error variant should only be used when PermitAttributes
is enabled.
Trait Implementations§
source§impl Debug for SchemaError
impl Debug for SchemaError
source§impl Display for SchemaError
impl Display for SchemaError
source§impl Error for SchemaError
impl Error for SchemaError
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<Error> for SchemaError
impl From<Error> for SchemaError
Auto Trait Implementations§
impl Freeze for SchemaError
impl !RefUnwindSafe for SchemaError
impl Send for SchemaError
impl Sync for SchemaError
impl Unpin for SchemaError
impl !UnwindSafe for SchemaError
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