pub struct ImplDecl {
pub matching_source: Fragment,
pub generics: Vec<Identifier>,
pub target: Type,
pub items: Vec<Item>,
}Available on crate feature
ast-models only.Expand description
An impl block, which associates items (functions, constants, and type aliases) with a type.
Fields§
§matching_source: FragmentFull matching source of the declaration.
generics: Vec<Identifier>Generic type parameters, such as the T in impl<T> Wrapper<T> { ... }.
target: TypeThe type the items are associated with.
items: Vec<Item>The items in the block. The parser only allows functions, constants, and type aliases here.
Trait Implementations§
impl StructuralPartialEq for ImplDecl
Auto Trait Implementations§
impl Forget for ImplDecl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more