pub enum Invalid {
Tiling {
covered_bits: u64,
declared_bits: u64,
},
CrossesWord(String),
Stated(String),
UnknownReference(String),
NonIntegerReference(String),
NotAFlagReference(String),
NotANestedLayout(String),
AfterOpenEnd(String),
DuplicateArm(u64),
Field {
at: String,
why: String,
},
Other(String),
}Expand description
Why an item failed validation.
Variants§
Tiling
The fields do not cover every bit of the container.
Fields
CrossesWord(String)
A words-mode bit field crosses a 16-bit word boundary.
Stated(String)
A field’s #[at] position does not match its computed position.
UnknownReference(String)
A reference names no earlier field.
NonIntegerReference(String)
A count, length, offset or switch refers to a field that is not an integer.
NotAFlagReference(String)
A Presence::Flag refers to a field that is not a bool.
NotANestedLayout(String)
A dotted reference, as written, reaches into a field that is not a nested layout.
AfterOpenEnd(String)
A segment follows one that reads to the end of the body.
DuplicateArm(u64)
Two arms have the same value.
Field
A refusal about one field.
Fields
Other(String)
Any other refusal.
Implementations§
Trait Implementations§
impl Eq for Invalid
Source§impl Error for Invalid
impl Error for Invalid
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()
impl StructuralPartialEq for Invalid
Auto Trait Implementations§
impl Freeze for Invalid
impl RefUnwindSafe for Invalid
impl Send for Invalid
impl Sync for Invalid
impl Unpin for Invalid
impl UnsafeUnpin for Invalid
impl UnwindSafe for Invalid
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