pub trait FromVariant: Sized {
// Required method
fn from_variant(variant: &Variant) -> Result<Self>;
}
Expand description
Creates an instance from a specified syn::Variant
.
Required Methods§
Sourcefn from_variant(variant: &Variant) -> Result<Self>
fn from_variant(variant: &Variant) -> Result<Self>
Create an instance from syn::Variant
, or return an error.
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.