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

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

Fields

style: Stylefields: Vec<T, Global>

Implementations

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 !=.

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

Consume an iterator, accumulating all lifetimes in the elements which occur in lifetimes.

Consume an iterator using collect_lifetimes, then clone all found lifetimes and return that set.

Consume an iterator, accumulating all type parameters in the elements which occur in type_set.

Consume an iterator using collect_type_params, then clone all found type params and return that set.

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 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.