from_enum

Trait FromEnum

Source
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§

Source

fn from_enum(e: &E) -> Option<&Self>

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§