pub trait FromVariant<T> {
// Required method
fn from_variant(variant: T) -> Self;
}Expand description
Creates an instance of Self from the unambiguous field type of one of its variants.
Required Methods§
Sourcefn from_variant(variant: T) -> Self
fn from_variant(variant: T) -> Self
Converts to this type from the variant’s type.
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.