#[repr(C)]pub struct ImplEntry {
pub def_index: u32,
pub self_ty: u32,
pub trait_def: u32,
pub trait_args_start: u32,
pub assoc_tys_start: u32,
pub assoc_defs_start: u32,
pub trait_args_len: u16,
pub assoc_tys_len: u16,
pub assoc_defs_len: u16,
pub flags: u8,
pub simplified_self: u8,
}Expand description
Structured inherent or trait impl header (32 bytes, 4-byte aligned).
Sorted on disk by (simplified_self, is_trait_u8, self_ty, trait_def, def_index).
Fields§
§def_index: u32Local DefEntry index of this impl block, or u32::MAX if metadata-only (e.g. sysroot).
self_ty: u32Exact Self type (TyId in TyArena, never peel_refs-collapsed).
trait_def: u32Implemented trait (TyDefId in TyArena), or u32::MAX (TyDefId::NONE) for inherent impls.
trait_args_start: u32Start index in ty_args for generic arguments applied to trait_def (excluding Self).
assoc_tys_start: u32Start index in assoc_tys for AssocTyEntry bindings belonging to this impl.
assoc_defs_start: u32Start index in ty_args for local DefEntry indices (AssocFn / AssocConst) of this impl.
trait_args_len: u16Number of encoded GenericArgWords starting at trait_args_start.
assoc_tys_len: u16Number of AssocTyEntry rows starting at assoc_tys_start.
assoc_defs_len: u16Number of u32 DefEntry indices starting at assoc_defs_start.
flags: u8Bitflags (IMPL_FLAG_*).
simplified_self: u8SimplifiedSelfKind discriminator (u8).