#[non_exhaustive]pub enum LinkError {
IncompleteSchema(IncompleteSchemaError),
ActionEntityTypeDeclared(EntityType),
DuplicateEntityType(EntityType),
DuplicateAction(EntityUID),
ExternalIsEnum(EntityType),
DefinedEntityAncestorsChanged(EntityType),
ExternalActionParentsMismatch(EntityUID),
ShadowsBuiltinType(EntityType),
Schema(SchemaError),
}Expand description
Errors reported by Linker::link, and by the callers that require a
linked schema to be complete.
Separate from SchemaError on purpose.
Constructing a partial schema succeeds, so incompleteness is not a
construction failure, and linking has failure modes that no schema
constructor can produce.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IncompleteSchema(IncompleteSchemaError)
The schema still declares some entity types or actions external
(RFC 116) rather than defining them.
ActionEntityTypeDeclared(EntityType)
An entity type has the same name as the type of an action.
DuplicateEntityType(EntityType)
Both schemas define the entity type.
DuplicateAction(EntityUID)
Both schemas define the action.
ExternalIsEnum(EntityType)
An external entity type links to an enumerated entity type.
DefinedEntityAncestorsChanged(EntityType)
Linking would add ancestors to a defined entity type.
ExternalActionParentsMismatch(EntityUID)
Two declarations of an action have different parents.
ShadowsBuiltinType(EntityType)
Linking would introduce an entity type that shadows a primitive or extension type.
Schema(SchemaError)
The linked schema is not well formed. Reports the same error that constructing the merged declarations would.
Trait Implementations§
Source§impl Diagnostic for LinkError
impl Diagnostic for LinkError
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 LinkError
impl Error for LinkError
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
use the Display impl or to_string()
Source§impl From<IncompleteSchemaError> for LinkError
impl From<IncompleteSchemaError> for LinkError
Source§fn from(source: IncompleteSchemaError) -> LinkError
fn from(source: IncompleteSchemaError) -> LinkError
Source§impl From<SchemaError> for LinkError
impl From<SchemaError> for LinkError
Source§fn from(source: SchemaError) -> LinkError
fn from(source: SchemaError) -> LinkError
Auto Trait Implementations§
impl !RefUnwindSafe for LinkError
impl !UnwindSafe for LinkError
impl Freeze for LinkError
impl Send for LinkError
impl Sync for LinkError
impl Unpin for LinkError
impl UnsafeUnpin for LinkError
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