Enum packed_struct::EnumCatchAll[][src]

pub enum EnumCatchAll<E> where
    E: PrimitiveEnum
{ Enum(E), CatchAll(E::Primitive), }

A wrapper for primitive enums that supports catching and retaining any values that don't have defined discriminants.

Variants

A matched discriminant

Some other value, stored as the primitive type

Methods

impl<E> EnumCatchAll<E> where
    E: PrimitiveEnum
[src]

Trait Implementations

impl<E: Copy> Copy for EnumCatchAll<E> where
    E: PrimitiveEnum,
    E::Primitive: Copy
[src]

impl<E: Clone> Clone for EnumCatchAll<E> where
    E: PrimitiveEnum,
    E::Primitive: Clone
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<E: Debug> Debug for EnumCatchAll<E> where
    E: PrimitiveEnum,
    E::Primitive: Debug
[src]

Formats the value using the given formatter. Read more

impl<E> From<E> for EnumCatchAll<E> where
    E: PrimitiveEnum
[src]

Performs the conversion.

impl<E> PartialEq<Self> for EnumCatchAll<E> where
    E: PrimitiveEnum
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<E> PrimitiveEnum for EnumCatchAll<E> where
    E: PrimitiveEnum
[src]

The primitve type into which we serialize and deserialize ourselves.

Convert from a primitive, might fail.

Convert to a primitive value.

Convert from a string value representing the variant. Case sensitive.

Convert from a string value representing the variant. Lowercase.

impl<E> PrimitiveEnumDynamicStr for EnumCatchAll<E> where
    E: PrimitiveEnum + PrimitiveEnumDynamicStr
[src]

Display value, same as the name of a particular variant.

A list all possible string variants.

Auto Trait Implementations

impl<E> Send for EnumCatchAll<E> where
    E: Send,
    <E as PrimitiveEnum>::Primitive: Send

impl<E> Sync for EnumCatchAll<E> where
    E: Sync,
    <E as PrimitiveEnum>::Primitive: Sync