#[repr(C)]pub struct RefEntry {
pub span: Span,
pub target_def_id: u32,
pub target_path_offset: u32,
pub target_file_offset: u32,
pub target_unit_offset: u32,
pub target_line: u32,
pub target_col: u32,
pub kind: u8,
pub is_write: u8,
pub flags: u8,
pub _pad: u8,
}Expand description
A reference/usage record pointing to a target definition or symbol.
Fields§
§span: SpanSource span of this reference usage
target_def_id: u32Target definition ID if resolved within the same crate, or u32::MAX for external
target_path_offset: u32Target canonical path offset in string pool (e.g. “std::convert::Into”)
target_file_offset: u32Target source file path offset in string pool, or 0 if external/unknown
target_unit_offset: u32Target compilation unit key offset in string pool, or 0 if unknown
target_line: u32Target definition line (1-based), or 0
target_col: u32Target definition col (1-based), or 0
kind: u8Kind of symbol being referenced
is_write: u8Usage flags: 1 = write/mutable, 0 = read/call
flags: u8Flags (bit 0: is_macro_expansion)
_pad: u8Implementations§
Source§impl RefEntry
impl RefEntry
pub fn to_le(self) -> Self
pub fn from_le(self) -> Self
pub fn span(&self) -> Span
pub fn target_def_id(&self) -> u32
pub fn target_path_offset(&self) -> u32
pub fn target_file_offset(&self) -> u32
pub fn target_unit_offset(&self) -> u32
pub fn target_line(&self) -> u32
pub fn target_col(&self) -> u32
pub fn is_macro_expansion(&self) -> bool
Trait Implementations§
impl Copy for RefEntry
impl Eq for RefEntry
impl StructuralPartialEq for RefEntry
Auto Trait Implementations§
impl Forget for RefEntry
impl Freeze for RefEntry
impl Move for RefEntry
impl RefUnwindSafe for RefEntry
impl Send for RefEntry
impl Sync for RefEntry
impl Unpin for RefEntry
impl UnsafeUnpin for RefEntry
impl UnwindSafe for RefEntry
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