#[non_exhaustive]pub enum ControlError {
WrongEntityType {
expected: &'static str,
actual: String,
},
MissingAttribute {
entity: &'static str,
id: EntityId,
attribute: &'static str,
},
UnknownEntity {
id: EntityId,
},
AuthoringInvalid {
entity: &'static str,
attribute: &'static str,
value: String,
},
UnsupportedEntity {
schema: String,
entity: &'static str,
},
}Expand description
Control projection or authoring failure.
Only the variants this crate can actually raise are declared. A variant that no code path constructs is a promise the crate does not keep, and callers write dead match arms for it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WrongEntityType
Entity kind differs from the requested projection.
MissingAttribute
Required positional attribute is absent or null.
Fields
UnknownEntity
Requested entity is absent.
AuthoringInvalid
Draft value is invalid before staging.
Fields
UnsupportedEntity
The schema in use does not declare this entity.
Authoring an entity the schema omits is a caller error, not a silently-skipped attribute.
Trait Implementations§
Source§impl Clone for ControlError
impl Clone for ControlError
Source§impl Debug for ControlError
impl Debug for ControlError
Source§impl Display for ControlError
impl Display for ControlError
Source§impl Error for ControlError
impl Error for ControlError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for ControlError
impl PartialEq for ControlError
impl StructuralPartialEq for ControlError
Auto Trait Implementations§
impl Freeze for ControlError
impl RefUnwindSafe for ControlError
impl Send for ControlError
impl Sync for ControlError
impl Unpin for ControlError
impl UnsafeUnpin for ControlError
impl UnwindSafe for ControlError
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
Mutably borrows from an owned value. Read more