pub struct UnknownVariant {
pub domain: &'static str,
pub value: String,
pub valid: &'static [&'static str],
}Expand description
A variant string was not recognized in a closed taxonomy.
Carries the rejected input, the domain name, and the list of valid values so callers get actionable error messages without re-matching.
Fields§
§domain: &'static str§value: String§valid: &'static [&'static str]Implementations§
Trait Implementations§
Source§impl Clone for UnknownVariant
impl Clone for UnknownVariant
Source§fn clone(&self) -> UnknownVariant
fn clone(&self) -> UnknownVariant
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 UnknownVariant
impl Debug for UnknownVariant
Source§impl Display for UnknownVariant
impl Display for UnknownVariant
Source§impl Error for UnknownVariant
Available on crate feature std only.
impl Error for UnknownVariant
Available on crate feature
std only.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()
Source§impl From<UnknownVariant> for TypeError
impl From<UnknownVariant> for TypeError
Source§fn from(e: UnknownVariant) -> Self
fn from(e: UnknownVariant) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UnknownVariant
impl PartialEq for UnknownVariant
Source§fn eq(&self, other: &UnknownVariant) -> bool
fn eq(&self, other: &UnknownVariant) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for UnknownVariant
impl StructuralPartialEq for UnknownVariant
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