Enum impl_tools_lib::generics::TypeParamBound
source · pub enum TypeParamBound {
Trait(TraitBound),
TraitSubst(Trait),
Lifetime(Lifetime),
}
Expand description
A trait or lifetime used as a bound on a type parameter.
This is a custom variant of syn::TypeParamBound
which supports trait
as a parameter bound.
Variants§
Trait(TraitBound)
A named trait used as a bound
TraitSubst(Trait)
trait
used as a bound (substituted for the trait name by ToTokensSubst
)
Lifetime(Lifetime)
A lifetime bound
Trait Implementations§
source§impl Debug for TypeParamBound
impl Debug for TypeParamBound
source§impl Parse for TypeParamBound
impl Parse for TypeParamBound
fn parse(input: ParseStream<'_>) -> Result<Self>
source§impl ToTokensSubst for TypeParamBound
impl ToTokensSubst for TypeParamBound
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