Trait num_enum::TryFromPrimitive[][src]

pub trait TryFromPrimitive: Sized {
    type Primitive: Copy + Eq + Debug;

    const NAME: &'static str;

    fn try_from_primitive(
        number: Self::Primitive
    ) -> Result<Self, TryFromPrimitiveError<Self>>; }

Associated Types

type Primitive: Copy + Eq + Debug[src]

Loading content...

Associated Constants

const NAME: &'static str[src]

Loading content...

Required methods

fn try_from_primitive(
    number: Self::Primitive
) -> Result<Self, TryFromPrimitiveError<Self>>
[src]

Loading content...

Implementors

Loading content...