Trait darling_core::FromVariant [−][src]
pub trait FromVariant: Sized { fn from_variant(variant: &Variant) -> Result<Self>; }
Creates an instance from a specified syn::Variant
.
Required methods
fn from_variant(variant: &Variant) -> Result<Self>
[src]
Create an instance from syn::Variant
, or return an error.
Implementations on Foreign Types
impl FromVariant for ()
[src]
impl FromVariant for ()
[src]fn from_variant(_: &Variant) -> Result<Self>
[src]
impl FromVariant for Variant
[src]
impl FromVariant for Variant
[src]fn from_variant(variant: &Variant) -> Result<Self>
[src]
impl FromVariant for Ident
[src]
impl FromVariant for Ident
[src]fn from_variant(variant: &Variant) -> Result<Self>
[src]
impl FromVariant for Vec<Attribute>
[src]
impl FromVariant for Vec<Attribute>
[src]fn from_variant(variant: &Variant) -> Result<Self>
[src]
Implementors
impl FromVariant for Ignored
[src]
impl FromVariant for Ignored
[src]fn from_variant(_: &Variant) -> Result<Self>
[src]
impl<T: FromVariant> FromVariant for SpannedValue<T>
[src]
impl<T: FromVariant> FromVariant for SpannedValue<T>
[src]fn from_variant(value: &Variant) -> Result<Self>
[src]
impl<T: FromVariant> FromVariant for WithOriginal<T, Variant>
[src]
impl<T: FromVariant> FromVariant for WithOriginal<T, Variant>
[src]