Trait num_enum::TryFromPrimitive

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

    const NAME: &'static str;

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

Required Associated Types§

Required Associated Constants§

source

const NAME: &'static str

Required Methods§

source

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

Object Safety§

This trait is not object safe.

Implementors§