Trait darling_core::FromVariant

source ·
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§

source

fn from_variant(variant: &Variant) -> Result<Self>

Create an instance from syn::Variant, or return an error.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl FromVariant for ()

source§

impl FromVariant for Ident

source§

fn from_variant(variant: &Variant) -> Result<Self>

source§

impl FromVariant for Vec<Attribute>

source§

fn from_variant(variant: &Variant) -> Result<Self>

source§

impl FromVariant for Variant

source§

fn from_variant(variant: &Variant) -> Result<Self>

Implementors§