pub trait AsVariantRef<T> {
// Required method
fn as_variant_ref(&self) -> Option<&T>;
}Expand description
Provides borrowed access to the current variant’s field.
Required Methods§
Sourcefn as_variant_ref(&self) -> Option<&T>
fn as_variant_ref(&self) -> Option<&T>
Returns a the inner value as &T if it is of type T, or None if it isn’t.