pub struct InvalidEnumDiscriminantError<T> {
pub enum_name: &'static str,
pub invalid_discriminant: T,
}Expand description
An error resulting from an invalid enum tag.
This context is used by the derive macro to trace what the invalid discriminant for an enum is.
Fields§
§enum_name: &'static strThe name of the enum with an invalid discriminant.
invalid_discriminant: TThe invalid value of the enum discriminant.
Trait Implementations§
Source§impl<T: Debug> Debug for InvalidEnumDiscriminantError<T>
impl<T: Debug> Debug for InvalidEnumDiscriminantError<T>
Source§impl<T: Display> Display for InvalidEnumDiscriminantError<T>
impl<T: Display> Display for InvalidEnumDiscriminantError<T>
Source§impl<T> Error for InvalidEnumDiscriminantError<T>
impl<T> Error for InvalidEnumDiscriminantError<T>
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()
Auto Trait Implementations§
impl<T> Freeze for InvalidEnumDiscriminantError<T>where
T: Freeze,
impl<T> RefUnwindSafe for InvalidEnumDiscriminantError<T>where
T: RefUnwindSafe,
impl<T> Send for InvalidEnumDiscriminantError<T>where
T: Send,
impl<T> Sync for InvalidEnumDiscriminantError<T>where
T: Sync,
impl<T> Unpin for InvalidEnumDiscriminantError<T>where
T: Unpin,
impl<T> UnwindSafe for InvalidEnumDiscriminantError<T>where
T: UnwindSafe,
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