Struct jmdict_enums::DisabledVariant [−][src]
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
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for DisabledVariant
impl Send for DisabledVariant
impl Sync for DisabledVariant
impl Unpin for DisabledVariant
impl UnwindSafe for DisabledVariant
Blanket Implementations
Mutably borrows from an owned value. Read more