Enum bytecheck::EnumCheckError
source · pub enum EnumCheckError<T> {
InvalidStruct {
variant_name: &'static str,
inner: StructCheckError,
},
InvalidTuple {
variant_name: &'static str,
inner: TupleStructCheckError,
},
InvalidTag(T),
}
Expand description
An error resulting from an invalid enum.
Variants§
InvalidStruct
A struct variant was invalid
Fields
§
inner: StructCheckError
The error that occurred while validating the variant
InvalidTuple
A tuple variant was invalid
Fields
§
inner: TupleStructCheckError
The error that occurred while validating the variant
InvalidTag(T)
The enum tag was invalid
Tuple Fields
§
0: T
The invalid value of the tag
Trait Implementations§
source§impl<T: Debug> Debug for EnumCheckError<T>
impl<T: Debug> Debug for EnumCheckError<T>
source§impl<T: Display> Display for EnumCheckError<T>
impl<T: Display> Display for EnumCheckError<T>
source§impl<T: Debug + Display> Error for EnumCheckError<T>
impl<T: Debug + Display> Error for EnumCheckError<T>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
Auto Trait Implementations§
impl<T> Freeze for EnumCheckError<T>where
T: Freeze,
impl<T> !RefUnwindSafe for EnumCheckError<T>
impl<T> !Send for EnumCheckError<T>
impl<T> !Sync for EnumCheckError<T>
impl<T> Unpin for EnumCheckError<T>where
T: Unpin,
impl<T> !UnwindSafe for EnumCheckError<T>
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