#[repr(C)]pub struct DefEntry {
pub def_id: u32,
pub kind: u8,
pub visibility: u8,
pub flags: u8,
pub _pad: u8,
pub name_offset: u32,
pub path_offset: u32,
pub sig_offset: u32,
pub span: Span,
}Expand description
A definition record in the index.
Fields§
§def_id: u32Crate-unique identifier for this definition
kind: u8Kind of definition (DefKind)
visibility: u8Visibility (0 = Public, 1 = Crate, 2 = Restricted, 3 = Private)
flags: u8Flags (bit 0: is_macro_expansion)
_pad: u8§name_offset: u32Short identifier name offset in string pool (e.g. “enter”)
path_offset: u32Canonical full path offset in string pool (e.g. “stdx::panic_context::enter”)
sig_offset: u32Signature or type string offset in string pool (e.g. “fn(String) -> PanicContext”), or 0
span: SpanSource span of the definition
Implementations§
Source§impl DefEntry
impl DefEntry
pub fn to_le(self) -> Self
pub fn from_le(self) -> Self
pub fn def_id(&self) -> u32
pub fn name_offset(&self) -> u32
pub fn path_offset(&self) -> u32
pub fn sig_offset(&self) -> u32
pub fn span(&self) -> Span
pub fn is_macro_expansion(&self) -> bool
pub fn is_reexport(&self) -> bool
pub const fn item_vis(&self) -> ItemVis
Trait Implementations§
impl Copy for DefEntry
impl Eq for DefEntry
impl StructuralPartialEq for DefEntry
Auto Trait Implementations§
impl Forget for DefEntry
impl Freeze for DefEntry
impl Move for DefEntry
impl RefUnwindSafe for DefEntry
impl Send for DefEntry
impl Sync for DefEntry
impl Unpin for DefEntry
impl UnsafeUnpin for DefEntry
impl UnwindSafe for DefEntry
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