pub struct ImplBlock {
pub docs: Vec<Spanned<String>>,
pub attrs: Vec<Attribute>,
pub generics: Vec<TypeParam>,
pub trait_: Option<Spanned<Path>>,
pub ty: Spanned<Type>,
pub where_clause: Vec<WhereBound>,
pub functions: Vec<Function>,
pub consts: Vec<ConstDecl>,
pub assoc_types: Vec<AssocTypeBinding>,
}Expand description
An impl block.
Fields§
§docs: Vec<Spanned<String>>The /// lines before it, one entry per line, holding the text after
the /// (spec
docs/superpowers/specs/2026-10-07-phase-3-1-formatter-design.md §4).
attrs: Vec<Attribute>§generics: Vec<TypeParam>§trait_: Option<Spanned<Path>>If Some, this is a trait impl: impl Trait for Type.
ty: Spanned<Type>§where_clause: Vec<WhereBound>§functions: Vec<Function>§consts: Vec<ConstDecl>§assoc_types: Vec<AssocTypeBinding>Associated types this impl binds (type Item = Int).
A third parallel vector beside functions and consts, not a variant
of a shared item enum: an ImplBlock has never had a unified item
list, and adding one would touch every consumer of the other two.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImplBlock
impl RefUnwindSafe for ImplBlock
impl Send for ImplBlock
impl Sync for ImplBlock
impl Unpin for ImplBlock
impl UnsafeUnpin for ImplBlock
impl UnwindSafe for ImplBlock
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