pub struct TypeParam {
    pub attrs: Vec<Attribute>,
    pub ident: Ident,
    pub colon_token: Option<Colon>,
    pub bounds: Punctuated<TypeParamBound, Add>,
    pub eq_token: Option<Eq>,
    pub default: Option<Type>,
}
Expand description

A generic type parameter: T: Into<String>.

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

Fields

attrs: Vec<Attribute>

Type parameter attributes

ident: Ident

Type parameter identifier

colon_token: Option<Colon>

:

bounds: Punctuated<TypeParamBound, Add>

List of type bounds

eq_token: Option<Eq>

=

default: Option<Type>

Optional default value

Trait Implementations

Formats the value using the given formatter. 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.