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