[][src]Trait lain::traits::ToPrimitive

pub trait ToPrimitive {
    type Output;
    fn to_primitive(&self) -> Self::Output;
}

Represents a type which can be converted to a primitive type. This should be used for enums so that the serializer can generically call YourEnum::ToPrimitive()

Associated Types

type Output

Loading content...

Required methods

fn to_primitive(&self) -> Self::Output

Loading content...

Implementors

impl<E, T> ToPrimitive for UnsafeEnum<E, T> where
    E: ToPrimitive<Output = T>,
    T: Copy
[src]

type Output = T

Loading content...