#[repr(C)]pub struct GenericParamEntry {
pub owner_key: u32,
pub def_index: u32,
pub name_offset: u32,
pub ty_or_default: u32,
pub param_idx: u16,
pub kind: u8,
pub flags: u8,
}Expand description
Structured generic parameter declaration (20 bytes, 4-byte aligned).
Sorted on disk by (owner_key, param_idx) for O(log N) binary search per DefEntry or ImplEntry.
Fields§
§owner_key: u32Encoded GenericOwner (Def(def_idx) or Impl(impl_idx)).
def_index: u32Local DefEntry index of this parameter if present in defs, or u32::MAX.
name_offset: u32Parameter name offset in string_pool (e.g. "T", "'a", "N", "Self").
ty_or_default: u32For Type with HAS_DEFAULT: default TyId (u32::MAX if no default).
For Const: value TyId of the const parameter (e.g. usize).
For Lifetime: u32::MAX.
param_idx: u16Exact rustc GenericParamDef.index matching TyKindView::Param { index, .. }.
kind: u8GenericParamKind (0 = Lifetime, 1 = Type, 2 = Const).
flags: u8GENERIC_PARAM_FLAG_* bitmask.
Implementations§
Trait Implementations§
Source§impl Clone for GenericParamEntry
impl Clone for GenericParamEntry
impl Copy for GenericParamEntry
Source§impl Debug for GenericParamEntry
impl Debug for GenericParamEntry
Source§impl Default for GenericParamEntry
impl Default for GenericParamEntry
impl Eq for GenericParamEntry
Source§impl PartialEq for GenericParamEntry
impl PartialEq for GenericParamEntry
impl StructuralPartialEq for GenericParamEntry
Auto Trait Implementations§
impl Forget for GenericParamEntry
impl Freeze for GenericParamEntry
impl Move for GenericParamEntry
impl RefUnwindSafe for GenericParamEntry
impl Send for GenericParamEntry
impl Sync for GenericParamEntry
impl Unpin for GenericParamEntry
impl UnsafeUnpin for GenericParamEntry
impl UnwindSafe for GenericParamEntry
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