Trait typeenum::HasVariant
source · [−]pub trait HasVariant<T>: From<T> {
fn get(&self) -> Option<&T>;
fn get_mut(&mut self) -> Option<&mut T>;
}Expand description
Signifies this type functions like an enum with variant T. This
means you can create Self from T, and given a Self you can
try to convert it into a T.