#[non_exhaustive]pub enum RdShapeErrorKind {
UnexpectedNode {
expected: RdExpectedNode,
actual: RdNodeKind,
},
UnexpectedOption,
MissingOption,
WrongArity {
expected: RdArity,
actual: usize,
},
Duplicate {
construct: RdConstruct,
first_path: RdPath,
},
UnexpectedContent {
actual: RdNodeKind,
},
InvalidValue {
construct: RdConstruct,
value: String,
},
CountMismatch {
construct: RdConstruct,
expected: usize,
actual: usize,
},
MissingFollowing {
construct: RdConstruct,
},
DefinitionMismatch {
construct: RdConstruct,
},
UnsupportedRepresentation {
construct: RdConstruct,
},
}Expand description
The shared vocabulary of shape errors returned by strict views.
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.
UnexpectedNode
UnexpectedOption
MissingOption
WrongArity
Duplicate
UnexpectedContent
Fields
§
actual: RdNodeKindInvalidValue
CountMismatch
MissingFollowing
Fields
§
construct: RdConstructDefinitionMismatch
Fields
§
construct: RdConstructUnsupportedRepresentation
Fields
§
construct: RdConstructTrait Implementations§
Source§impl Clone for RdShapeErrorKind
impl Clone for RdShapeErrorKind
Source§fn clone(&self) -> RdShapeErrorKind
fn clone(&self) -> RdShapeErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RdShapeErrorKind
impl Debug for RdShapeErrorKind
Source§impl Display for RdShapeErrorKind
impl Display for RdShapeErrorKind
impl Eq for RdShapeErrorKind
Source§impl PartialEq for RdShapeErrorKind
impl PartialEq for RdShapeErrorKind
impl StructuralPartialEq for RdShapeErrorKind
Auto Trait Implementations§
impl Freeze for RdShapeErrorKind
impl RefUnwindSafe for RdShapeErrorKind
impl Send for RdShapeErrorKind
impl Sync for RdShapeErrorKind
impl Unpin for RdShapeErrorKind
impl UnsafeUnpin for RdShapeErrorKind
impl UnwindSafe for RdShapeErrorKind
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