Struct impl_tools_lib::generics::TypeParam
source · 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: IdentType 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§
source§impl ToTokensSubst for TypeParam
impl ToTokensSubst for TypeParam
source§fn to_tokens_subst(&self, tokens: &mut TokenStream, subst: &TokenStream)
fn to_tokens_subst(&self, tokens: &mut TokenStream, subst: &TokenStream)
Write
self to the given TokenStream