pub struct TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body> {
pub mods: Mods,
pub type_variables: TypeVars,
pub the_trait: Trait,
pub receiver: Recv,
pub where_conds: Where,
pub body: Body,
}Expand description
The implementation declaration for a trait, applying to a certain receiver.
Fields§
§mods: ModsThe modifiers on the impl block.
Set to NoOpSeq for none, or use SingularSeq(ModUnsafe) to generate an unsafe impl.
type_variables: TypeVarsThe type variables to use for the impl block itself. All type variables that appear later on the trait or the receiver must be declared here, per Rust language rules.
This field must be a sequence.
the_trait: TraitThe trait being implemented
receiver: RecvThe receiver for which it is implemented
where_conds: WhereThe “where” conditions. Must be a sequence. Set to NoOpSeq to disable.
Will render as where C1, C2, C3, ... where CX is a value in the sequence.
body: BodyThe body. Use NoOp if none exists.
Trait Implementations§
Source§impl<Mods, TypeVars, Trait, Recv, Where, Body> CanHaveAttributes for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
impl<Mods, TypeVars, Trait, Recv, Where, Body> CanHaveAttributes for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
Source§fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>
fn with_attributes<Attr>(self, attr: Attr) -> WithAttributes<Attr, Self>
Adds attributes to this writable
Source§impl<Mods: Clone, TypeVars: Clone, Trait: Clone, Recv: Clone, Where: Clone, Body: Clone> Clone for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
impl<Mods: Clone, TypeVars: Clone, Trait: Clone, Recv: Clone, Where: Clone, Body: Clone> Clone for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
Source§impl<Mods: Debug, TypeVars: Debug, Trait: Debug, Recv: Debug, Where: Debug, Body: Debug> Debug for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
impl<Mods: Debug, TypeVars: Debug, Trait: Debug, Recv: Debug, Where: Debug, Body: Debug> Debug for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
Source§impl<O, Mods, TypeVars, Trait, Recv, Where, Body> Writable<O> for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>where
O: Output,
Mods: WritableSeq<O>,
TypeVars: WritableSeq<O>,
Trait: Writable<O>,
Recv: Writable<O>,
Where: WritableSeq<O>,
Body: Writable<O>,
impl<O, Mods, TypeVars, Trait, Recv, Where, Body> Writable<O> for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>where
O: Output,
Mods: WritableSeq<O>,
TypeVars: WritableSeq<O>,
Trait: Writable<O>,
Recv: Writable<O>,
Where: WritableSeq<O>,
Body: Writable<O>,
Auto Trait Implementations§
impl<Mods, TypeVars, Trait, Recv, Where, Body> Freeze for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
impl<Mods, TypeVars, Trait, Recv, Where, Body> RefUnwindSafe for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>where
Mods: RefUnwindSafe,
TypeVars: RefUnwindSafe,
Trait: RefUnwindSafe,
Recv: RefUnwindSafe,
Where: RefUnwindSafe,
Body: RefUnwindSafe,
impl<Mods, TypeVars, Trait, Recv, Where, Body> Send for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
impl<Mods, TypeVars, Trait, Recv, Where, Body> Sync for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
impl<Mods, TypeVars, Trait, Recv, Where, Body> Unpin for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>
impl<Mods, TypeVars, Trait, Recv, Where, Body> UnwindSafe for TraitImpl<Mods, TypeVars, Trait, Recv, Where, Body>where
Mods: UnwindSafe,
TypeVars: UnwindSafe,
Trait: UnwindSafe,
Recv: UnwindSafe,
Where: UnwindSafe,
Body: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more