[−][src]Enum packed_struct::EnumCatchAll
A wrapper for primitive enums that supports catching and retaining any values that don't have defined discriminants.
Variants
A matched discriminant
CatchAll(E::Primitive)
Some other value, stored as the primitive type
Implementations
impl<E> EnumCatchAll<E> where
E: PrimitiveEnum,
[src]
E: PrimitiveEnum,
Trait Implementations
impl<E: Clone> Clone for EnumCatchAll<E> where
E: PrimitiveEnum,
E::Primitive: Clone,
[src]
E: PrimitiveEnum,
E::Primitive: Clone,
fn clone(&self) -> EnumCatchAll<E>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<E: Copy> Copy for EnumCatchAll<E> where
E: PrimitiveEnum,
E::Primitive: Copy,
[src]
E: PrimitiveEnum,
E::Primitive: Copy,
impl<E: Debug> Debug for EnumCatchAll<E> where
E: PrimitiveEnum,
E::Primitive: Debug,
[src]
E: PrimitiveEnum,
E::Primitive: Debug,
impl<E> From<E> for EnumCatchAll<E> where
E: PrimitiveEnum,
[src]
E: PrimitiveEnum,
impl<E> PartialEq<EnumCatchAll<E>> for EnumCatchAll<E> where
E: PrimitiveEnum,
[src]
E: PrimitiveEnum,
impl<E> PrimitiveEnum for EnumCatchAll<E> where
E: PrimitiveEnum,
[src]
E: PrimitiveEnum,
type Primitive = E::Primitive
The primitve type into which we serialize and deserialize ourselves.
fn from_primitive(val: E::Primitive) -> Option<Self>
[src]
fn to_primitive(&self) -> E::Primitive
[src]
fn from_str(s: &str) -> Option<Self>
[src]
fn from_str_lower(s: &str) -> Option<Self>
[src]
impl<E> PrimitiveEnumDynamicStr for EnumCatchAll<E> where
E: PrimitiveEnum + PrimitiveEnumDynamicStr,
[src]
E: PrimitiveEnum + PrimitiveEnumDynamicStr,
fn to_display_str(&self) -> Cow<'static, str>
[src]
Display value, same as the name of a particular variant.
fn all_variants() -> Cow<'static, [Self]>
[src]
Auto Trait Implementations
impl<E> RefUnwindSafe for EnumCatchAll<E> where
E: RefUnwindSafe,
<E as PrimitiveEnum>::Primitive: RefUnwindSafe,
E: RefUnwindSafe,
<E as PrimitiveEnum>::Primitive: RefUnwindSafe,
impl<E> Send for EnumCatchAll<E> where
E: Send,
<E as PrimitiveEnum>::Primitive: Send,
E: Send,
<E as PrimitiveEnum>::Primitive: Send,
impl<E> Sync for EnumCatchAll<E> where
E: Sync,
<E as PrimitiveEnum>::Primitive: Sync,
E: Sync,
<E as PrimitiveEnum>::Primitive: Sync,
impl<E> Unpin for EnumCatchAll<E> where
E: Unpin,
<E as PrimitiveEnum>::Primitive: Unpin,
E: Unpin,
<E as PrimitiveEnum>::Primitive: Unpin,
impl<E> UnwindSafe for EnumCatchAll<E> where
E: UnwindSafe,
<E as PrimitiveEnum>::Primitive: UnwindSafe,
E: UnwindSafe,
<E as PrimitiveEnum>::Primitive: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<!> for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,