pub struct DisabledVariant;
Expand description
Error type for all enum conversions of the form impl TryFrom<AllFoo> for Foo
.
The error is returned for variants from the full enum that are disabled in the main enum because of the compile-time configuration. For example:
use std::convert::TryInto;
let val: Result<PartOfSpeech, _> = AllPartOfSpeech::NariAdjective.try_into();
#[cfg(feature = "scope-archaic")]
assert_eq!(val, Ok(PartOfSpeech::NariAdjective));
#[cfg(not(feature = "scope-archaic"))]
assert_eq!(val, Err(DisabledVariant));
Trait Implementations§
Source§impl Clone for DisabledVariant
impl Clone for DisabledVariant
Source§fn clone(&self) -> DisabledVariant
fn clone(&self) -> DisabledVariant
Returns a duplicate 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 DisabledVariant
impl Debug for DisabledVariant
Source§impl Default for DisabledVariant
impl Default for DisabledVariant
Source§fn default() -> DisabledVariant
fn default() -> DisabledVariant
Returns the “default value” for a type. Read more
Source§impl Hash for DisabledVariant
impl Hash for DisabledVariant
Source§impl PartialEq for DisabledVariant
impl PartialEq for DisabledVariant
impl Copy for DisabledVariant
impl Eq for DisabledVariant
impl StructuralPartialEq for DisabledVariant
Auto Trait Implementations§
impl Freeze for DisabledVariant
impl RefUnwindSafe for DisabledVariant
impl Send for DisabledVariant
impl Sync for DisabledVariant
impl Unpin for DisabledVariant
impl UnwindSafe for DisabledVariant
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