Trait CheckedEnum

Source
pub trait CheckedEnum: Sized + 'static {
    type Storage: Copy + Clone + 'static;

    // Required methods
    fn try_from_storage(val: Self::Storage) -> Option<Self>;
    fn to_storage(self) -> Self::Storage;
}

Required Associated Types§

Source

type Storage: Copy + Clone + 'static

Required Methods§

Source

fn try_from_storage(val: Self::Storage) -> Option<Self>

Source

fn to_storage(self) -> Self::Storage

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.

Implementors§