pub enum Problem {
Invalid,
Syntax,
Expected,
NotAReference,
WrongKind,
UnknownField,
MissingField,
OutOfRange,
BadTyped,
BadBinary,
BadId,
Unresolved,
}Expand description
What’s wrong with a value, as this crate finds it: each a stable code
(SD…) tools can match on.
Variants§
Invalid
Any other problem with a value.
Syntax
Text that doesn’t parse.
Expected
A value of another type than its field’s.
NotAReference
A bare id where a reference goes (@file:…).
WrongKind
A reference to another kind than its field takes.
UnknownField
A key the type doesn’t have.
MissingField
A required field that isn’t there.
OutOfRange
A number outside its field’s range.
BadTyped
A string written as a typed value that isn’t one (@File:x).
BadBinary
Binary data that won’t decode.
BadId
A reference whose id isn’t of its kind’s id type (@user:abc where
a user’s id is a number).
Unresolved
A reference to nothing there is (a crate::Resolve says so).
Implementations§
Trait Implementations§
impl Copy for Problem
impl Eq for Problem
impl StructuralPartialEq for Problem
Auto Trait Implementations§
impl Freeze for Problem
impl RefUnwindSafe for Problem
impl Send for Problem
impl Sync for Problem
impl Unpin for Problem
impl UnsafeUnpin for Problem
impl UnwindSafe for Problem
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