[][src]Struct swc_macros_common::binder::VariantBinder

pub struct VariantBinder<'a> { /* fields omitted */ }

Variant.

Methods

impl<'a> VariantBinder<'a>[src]

pub const fn new(
    enum_name: Option<&'a Ident>,
    name: &'a Ident,
    data: &'a Fields,
    attrs: &'a [Attribute]
) -> Self
[src]

pub const fn variant_name(&self) -> &Ident[src]

pub const fn data(&self) -> &Fields[src]

pub const fn attrs(&self) -> &[Attribute][src]

pub fn qual_path(&self) -> Path[src]

EnumName::VariantName for enum, and StructName for struct.

pub fn bind(
    &self,
    prefix: &str,
    by_ref: Option<Ref>,
    mutability: Option<Mut>
) -> (Pat, Vec<BindedField<'a>>)
[src]

  • prefix: prefix of field binding.

Trait Implementations

impl<'a> Clone for VariantBinder<'a>[src]

impl<'a> Debug for VariantBinder<'a>[src]

Auto Trait Implementations

impl<'a> !Send for VariantBinder<'a>

impl<'a> !Sync for VariantBinder<'a>

impl<'a> Unpin for VariantBinder<'a>

impl<'a> !UnwindSafe for VariantBinder<'a>

impl<'a> !RefUnwindSafe for VariantBinder<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]