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§
Sourcefn as_variant(&self) -> Option<T>
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.