pub struct Generics {
    pub lt_token: Option<Lt>,
    pub params: Punctuated<GenericParam, Comma>,
    pub gt_token: Option<Gt>,
    pub where_clause: Option<WhereClause>,
}
Expand description

Lifetimes and type parameters attached an item

This is a custom variant of syn::Generics which supports trait as a parameter bound.

Fields

lt_token: Option<Lt>

<

params: Punctuated<GenericParam, Comma>

Parameters

gt_token: Option<Gt>

>

where_clause: Option<WhereClause>

where bounds

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Write self to the given TokenStream

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.