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
sourceimpl Debug for TypeParamBound
impl Debug for TypeParamBound
sourceimpl Parse for TypeParamBound
impl Parse for TypeParamBound
fn parse(input: ParseStream<'_>) -> Result<Self>
sourceimpl ToTokensSubst for TypeParamBound
impl ToTokensSubst for TypeParamBound
sourcefn 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
Auto Trait Implementations
impl RefUnwindSafe for TypeParamBound
impl !Send for TypeParamBound
impl !Sync for TypeParamBound
impl Unpin for TypeParamBound
impl UnwindSafe for TypeParamBound
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more