pub trait FromEnum<E> {
// Required method
fn from_enum(e: &E) -> Option<&Self>;
}Expand description
Attempts to match the enum E to find a variant with a single field of type Self.
Required Methods§
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.