pub enum Structure<'a> {
    Struct {
        struct_name: &'a Ident,
        struct_attrs: &'a Vec<Attribute>,
    },
    EnumVariant {
        enum_name: &'a Ident,
        enum_attrs: &'a Vec<Attribute>,
        variant_name: &'a Ident,
        variant_attrs: &'a Vec<Attribute>,
    },
}
Expand description

The data type the field is under

Variants§

§

Struct

Fields

§struct_name: &'a Ident
§struct_attrs: &'a Vec<Attribute>
§

EnumVariant

Fields

§enum_name: &'a Ident
§enum_attrs: &'a Vec<Attribute>
§variant_name: &'a Ident
§variant_attrs: &'a Vec<Attribute>

Implementations§

Returns attributes on the declaration of the fields AND if a enum on the enum item

Returns attributes on the declaration of the fields

Struct name or just the variant

Struct name or enum and variant name concatenated with double colon

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.