Trait darling::FromVariant
source · [−]pub trait FromVariant {
fn from_variant(variant: &Variant) -> Result<Self, Error>;
}
Expand description
Creates an instance from a specified syn::Variant
.
Required methods
fn from_variant(variant: &Variant) -> Result<Self, Error>
fn from_variant(variant: &Variant) -> Result<Self, Error>
Create an instance from syn::Variant
, or return an error.