Trait AsVariant

Source
pub trait AsVariant<T> {
    // Required method
    fn as_variant(&self) -> Option<T>;
}
Expand description

Provides owned access to the current variant’s field.

Required Methods§

Source

fn as_variant(&self) -> Option<T>

Returns a the inner value as T if it is of type T, or None if it isn’t.

Implementors§