pub struct ImplDecl {
pub type_params: Vec<TypeParam>,
pub target: TypeExpr,
pub trait_ref: Option<TypeExpr>,
pub methods: Vec<FnDecl>,
pub span: Span,
}Expand description
Impl block: impl Foo { ... } or impl Trait for Foo { ... }
Associates method implementations with a target type, optionally satisfying a trait contract.
Fields§
§type_params: Vec<TypeParam>Generic type parameters on the impl.
target: TypeExprThe type being implemented (e.g., Foo<T>).
trait_ref: Option<TypeExpr>Optional trait being implemented for the target type.
methods: Vec<FnDecl>Method implementations.
span: SpanSource span of the impl block.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImplDecl
impl RefUnwindSafe for ImplDecl
impl Send for ImplDecl
impl Sync for ImplDecl
impl Unpin for ImplDecl
impl UnsafeUnpin for ImplDecl
impl UnwindSafe for ImplDecl
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