Struct enum_extract_error::EnumExtractError
source · pub struct EnumExtractError {
pub expected: &'static str,
pub actual: &'static str,
}
Expand description
An error that occurs when the actual variant does not match the expected variant.
Fields§
§expected: &'static str
The name of the expected variant.
actual: &'static str
The name of the actual variant.
Implementations§
source§impl EnumExtractError
impl EnumExtractError
sourcepub fn new(expected: &'static str, actual: &'static str) -> Self
pub fn new(expected: &'static str, actual: &'static str) -> Self
Create a new EnumExtractError
.
Trait Implementations§
source§impl Clone for EnumExtractError
impl Clone for EnumExtractError
source§fn clone(&self) -> EnumExtractError
fn clone(&self) -> EnumExtractError
Returns a copy of the value. Read more
1.0.0 · 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 EnumExtractError
impl Debug for EnumExtractError
source§impl Display for EnumExtractError
impl Display for EnumExtractError
source§impl Error for EnumExtractError
impl Error for EnumExtractError
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()
source§impl<T> From<EnumExtractValueError<T>> for EnumExtractError
impl<T> From<EnumExtractValueError<T>> for EnumExtractError
source§fn from(value: EnumExtractValueError<T>) -> Self
fn from(value: EnumExtractValueError<T>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl RefUnwindSafe for EnumExtractError
impl Send for EnumExtractError
impl Sync for EnumExtractError
impl Unpin for EnumExtractError
impl UnwindSafe for EnumExtractError
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