pub struct Impl<Mods, TypeVars, Recv, Where, Body> {
pub mods: Mods,
pub type_variables: TypeVars,
pub receiver: Recv,
pub where_conds: Where,
pub body: Body,
}Expand description
An impl block.
For impls of a trait for a certain receiver, it is suggested to use TraitImpl.
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.
receiver: RecvThe receiver for which the implementation exists
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, Recv, Where, Body> CanHaveAttributes for Impl<Mods, TypeVars, Recv, Where, Body>
impl<Mods, TypeVars, Recv, Where, Body> CanHaveAttributes for Impl<Mods, TypeVars, 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, Recv: Clone, Where: Clone, Body: Clone> Clone for Impl<Mods, TypeVars, Recv, Where, Body>
impl<Mods: Clone, TypeVars: Clone, Recv: Clone, Where: Clone, Body: Clone> Clone for Impl<Mods, TypeVars, Recv, Where, Body>
Source§impl<Mods: Debug, TypeVars: Debug, Recv: Debug, Where: Debug, Body: Debug> Debug for Impl<Mods, TypeVars, Recv, Where, Body>
impl<Mods: Debug, TypeVars: Debug, Recv: Debug, Where: Debug, Body: Debug> Debug for Impl<Mods, TypeVars, Recv, Where, Body>
Source§impl<O, Mods, TypeVars, Recv, Where, Body> Writable<O> for Impl<Mods, TypeVars, Recv, Where, Body>where
O: Output,
Mods: WritableSeq<O>,
TypeVars: WritableSeq<O>,
Recv: Writable<O>,
Where: WritableSeq<O>,
Body: Writable<O>,
impl<O, Mods, TypeVars, Recv, Where, Body> Writable<O> for Impl<Mods, TypeVars, Recv, Where, Body>where
O: Output,
Mods: WritableSeq<O>,
TypeVars: WritableSeq<O>,
Recv: Writable<O>,
Where: WritableSeq<O>,
Body: Writable<O>,
Auto Trait Implementations§
impl<Mods, TypeVars, Recv, Where, Body> Freeze for Impl<Mods, TypeVars, Recv, Where, Body>
impl<Mods, TypeVars, Recv, Where, Body> RefUnwindSafe for Impl<Mods, TypeVars, Recv, Where, Body>where
Mods: RefUnwindSafe,
TypeVars: RefUnwindSafe,
Recv: RefUnwindSafe,
Where: RefUnwindSafe,
Body: RefUnwindSafe,
impl<Mods, TypeVars, Recv, Where, Body> Send for Impl<Mods, TypeVars, Recv, Where, Body>
impl<Mods, TypeVars, Recv, Where, Body> Sync for Impl<Mods, TypeVars, Recv, Where, Body>
impl<Mods, TypeVars, Recv, Where, Body> Unpin for Impl<Mods, TypeVars, Recv, Where, Body>
impl<Mods, TypeVars, Recv, Where, Body> UnwindSafe for Impl<Mods, TypeVars, Recv, Where, Body>where
Mods: UnwindSafe,
TypeVars: 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