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§
Required Methods§
fn try_from_storage(val: Self::Storage) -> Option<Self>
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.