Struct rustc_hir::hir::TraitItem [−][src]
pub struct TraitItem<'hir> {
pub ident: Ident,
pub def_id: LocalDefId,
pub generics: Generics<'hir>,
pub kind: TraitItemKind<'hir>,
pub span: Span,
}
Expand description
Represents an item declaration within a trait declaration, possibly including a default implementation. A trait item is either required (meaning it doesn’t have an implementation, just a signature) or provided (meaning it has a default implementation).
Fields
ident: Ident
def_id: LocalDefId
generics: Generics<'hir>
kind: TraitItemKind<'hir>
span: Span
Implementations
Trait Implementations
Auto Trait Implementations
impl<'hir> RefUnwindSafe for TraitItem<'hir>
impl<'hir> UnwindSafe for TraitItem<'hir>
Blanket Implementations
Layout
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 128 bytes