pub enum SchemaError {
Show 18 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(EntityUID),
CycleInCommonTypeReferences(Name),
ActionEntityTypeDeclared,
ContextOrShapeNotRecord(ContextOrShape),
ActionAttributesContainEmptySet(EntityUID),
UnsupportedActionAttribute(EntityUID, String),
ActionAttrEval(EntityAttrEvaluationError),
ExprEscapeUsed,
}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>)
This error occurs in either of the following cases (see discussion on #477): - undeclared common type(s) appearing in entity or context attributes - common type(s) (declared or not) appearing in declarations of other common types
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(EntityUID)
Cycle in the schema’s action hierarchy.
CycleInCommonTypeReferences(Name)
Cycle in the schema’s common type declarations.
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.
ContextOrShapeNotRecord(ContextOrShape)
context or shape fields are not records
ActionAttributesContainEmptySet(EntityUID)
An action entity (transitively) has an attribute that is an empty set.
The validator cannot assign a type to an empty set.
This error variant should only be used when PermitAttributes is enabled.
UnsupportedActionAttribute(EntityUID, String)
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.
ActionAttrEval(EntityAttrEvaluationError)
Error when evaluating an action attribute
ExprEscapeUsed
Error thrown when the schema contains the __expr escape.
Support for this escape form has been dropped.
Trait Implementations§
Source§impl Debug for SchemaError
impl Debug for SchemaError
Source§impl Diagnostic for SchemaError
impl Diagnostic for SchemaError
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 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
Source§impl From<SchemaError> for HumanSchemaError
impl From<SchemaError> for HumanSchemaError
Source§fn from(source: SchemaError) -> Self
fn from(source: SchemaError) -> Self
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