Struct TraitBound
pub struct TraitBound { pub paren_token: Option<Paren>, pub lifetimes: Option<BoundLifetimes>, pub modifiers: TraitBoundModifiers, pub maybe: Option<Question>, pub path: Path }
A trait used as a bound on a type parameter.
Fields
paren_token: Option<Paren>lifetimes: Option<BoundLifetimes>The
for<'a>infor<'a> Foo<&'a T>modifiers: TraitBoundModifiers(Non-exhaustive) Additional optional information about a trait bound.
maybe: Option<Question>The
?in?Sizedpath: PathThe
Foo<&'a T>infor<'a> Foo<&'a T>
Trait Implementations
impl Clone for TraitBound
fn clone(&self) -> Self
impl Parse for TraitBound
fn parse(input: ParseStream<'_>) -> Result<Self>
impl ToTokens for TraitBound
fn to_tokens(&self, tokens: &mut TokenStream)
Auto Trait Implementations
impl !Send for TraitBound
impl !Sync for TraitBound
impl Freeze for TraitBound
impl RefUnwindSafe for TraitBound
impl Unpin for TraitBound
impl UnsafeUnpin for TraitBound
impl UnwindSafe for TraitBound
Blanket Implementations
impl<T> Any for TraitBound
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for TraitBound
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for TraitBound
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for TraitBound
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for TraitBound
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Spanned for TraitBound
where
T: Spanned + ?Sized,
fn span(&self) -> Span
impl<T> ToOwned for TraitBound
where
T: Clone,
type Owned = T;fn to_owned(&self) -> Tfn clone_into(&self, target: &mut T)
impl<T, U> Into<U> for TraitBound
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for TraitBound
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for TraitBound
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>