[][src]Struct derive_utils::EnumData

pub struct EnumData { /* fields omitted */ }

A structure to make trait implementation to enums more efficient.

Implementations

impl EnumData[src]

pub fn field_types(&self) -> impl ExactSizeIterator<Item = &Type> + Clone[src]

Returns an iterator over field types.

enum Enum<TypeA, TypeB> {
    VariantA(TypeA),
             ^^^^^
    VariantB(TypeB),
             ^^^^^
}

pub fn variant_idents(&self) -> impl ExactSizeIterator<Item = &Ident> + Clone[src]

Returns an iterator over variant names.

enum Enum<TypeA, TypeB> {
    VariantA(TypeA),
    ^^^^^^^^
    VariantB(TypeB),
    ^^^^^^^^
}

Trait Implementations

impl Deref for EnumData[src]

type Target = ItemEnum

The resulting type after dereferencing.

impl From<EnumData> for ItemEnum[src]

impl Parse for EnumData[src]

impl ToTokens for EnumData[src]

Auto Trait Implementations

impl !RefUnwindSafe for EnumData

impl !Send for EnumData

impl !Sync for EnumData

impl Unpin for EnumData

impl UnwindSafe for EnumData

Blanket Implementations

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

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

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

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

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

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

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.