Enum syn_helpers::Fields

source ·
pub enum Fields {
    Named(Vec<NamedField>, Vec<Attribute>),
    Unnamed(Vec<UnnamedField>, Vec<Attribute>),
    Unit(Vec<Attribute>),
}
Expand description

Represents the fields in a structure. This could be the fields on a struct or the fields in the variant of a enum

Variants§

§

Named(Vec<NamedField>, Vec<Attribute>)

*name* { X: String }

§

Unnamed(Vec<UnnamedField>, Vec<Attribute>)

*name*(String)

§

Unit(Vec<Attribute>)

No fields *name*

Implementations§

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.