pub struct UnknownVariant {
pub kind: &'static str,
pub value: String,
}Expand description
Error returned by TryFrom<&str> and FromStr parsers when an unknown
enum name is encountered. Each enum in this crate uses this type to
preserve a uniform error surface across the vocabulary.
Fields§
§kind: &'static strThe enum name (e.g. "Severity").
value: StringThe unrecognised input.
Trait Implementations§
Source§impl Debug for UnknownVariant
impl Debug for UnknownVariant
Source§impl Display for UnknownVariant
impl Display for UnknownVariant
Source§impl Error for UnknownVariant
impl Error for UnknownVariant
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 Freeze for UnknownVariant
impl RefUnwindSafe for UnknownVariant
impl Send for UnknownVariant
impl Sync for UnknownVariant
impl Unpin for UnknownVariant
impl UnsafeUnpin for UnknownVariant
impl UnwindSafe for UnknownVariant
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