[][src]Enum syn::VariantData

pub enum VariantData {
    Struct(Vec<Field>),
    Tuple(Vec<Field>),
    Unit,
}

Data stored within an enum variant or struct.

Variants

Struct(Vec<Field>)

Struct variant, e.g. Point { x: f64, y: f64 }.

Tuple(Vec<Field>)

Tuple variant, e.g. Some(T).

Unit

Unit variant, e.g. None.

Methods

impl VariantData[src]

pub fn fields(&self) -> &[Field][src]

Slice containing the fields stored in the variant.

pub fn fields_mut(&mut self) -> &mut [Field][src]

Mutable slice containing the fields stored in the variant.

Trait Implementations

impl Clone for VariantData[src]

impl Eq for VariantData[src]

impl PartialEq<VariantData> for VariantData[src]

impl Debug for VariantData[src]

impl Hash for VariantData[src]

impl StructuralPartialEq for VariantData[src]

impl StructuralEq for VariantData[src]

impl ToTokens for VariantData[src]

Auto Trait Implementations

impl Send for VariantData

impl Sync for VariantData

impl Unpin for VariantData

impl UnwindSafe for VariantData

impl RefUnwindSafe for VariantData

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]