pub struct Fields<T> {
    pub style: Style,
    pub fields: Vec<T>,
    /* private fields */
}
Expand description

Equivalent to syn::Fields, but replaces the AST element with a generic.

Fields

style: Stylefields: Vec<T>

Implementations

Creates a new Fields struct.

Adds a Span to Fields.

Splits the Fields into its style and fields for further processing. Returns an empty Vec for Unit data.

Returns true if this variant’s data makes it a newtype.

Returns the number of fields in the structure.

Returns true if the Fields contains no fields.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Converts to this type from the input type.

Converts to this type from the input type.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Write self to the given TokenStream. Read more

Convert self directly into a TokenStream object. Read more

Convert self directly into a TokenStream object. Read more

Returns the subset of the queried lifetimes that are used by the implementing syntax element. Read more

Find all used lifetimes, then clone them and return that set.

Returns the subset of the queried type parameters that are used by the implementing syntax element. Read more

Find all type params using uses_type_params, then clone the found values and return the set.

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.

Returns a Span covering the complete contents of this syntax tree node, or Span::call_site() if this node is empty. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.