Trait ConvertRepr

Source
pub trait ConvertRepr: Sized {
    type Repr;

    // Required methods
    fn try_from_repr(repr: Self::Repr) -> Option<Self>;
    fn into_repr(self) -> Self::Repr;
}

Required Associated Types§

Required Methods§

Source

fn try_from_repr(repr: Self::Repr) -> Option<Self>

Source

fn into_repr(self) -> Self::Repr

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ConvertRepr for bool

Source§

impl ConvertRepr for u8

Source§

impl ConvertRepr for u16

Source§

impl ConvertRepr for u32

Source§

impl ConvertRepr for u64

Source§

impl ConvertRepr for u128

Source§

impl ConvertRepr for usize

Implementors§