pub struct UnitIndex<R: Reader> { /* private fields */ }
Expand description
The partially parsed index from a DebugCuIndex
or DebugTuIndex
.
Implementations§
source§impl<R: Reader> UnitIndex<R>
impl<R: Reader> UnitIndex<R>
sourcepub fn find(&self, id: u64) -> Option<u32>
pub fn find(&self, id: u64) -> Option<u32>
Find id
in the index hash table, and return the row index.
id
may be a compilation unit ID if this index is from .debug_cu_index
,
or a type signature if this index is from .debug_tu_index
.
sourcepub fn sections(&self, row: u32) -> Result<UnitIndexSectionIterator<'_, R>>
pub fn sections(&self, row: u32) -> Result<UnitIndexSectionIterator<'_, R>>
Return the section offsets and sizes for the given row index.
sourcepub fn section_count(&self) -> u32
pub fn section_count(&self) -> u32
Return the number of sections.
sourcepub fn unit_count(&self) -> u32
pub fn unit_count(&self) -> u32
Return the number of units.
sourcepub fn slot_count(&self) -> u32
pub fn slot_count(&self) -> u32
Return the number of slots.
Trait Implementations§
Auto Trait Implementations§
impl<R> Freeze for UnitIndex<R>where
R: Freeze,
impl<R> RefUnwindSafe for UnitIndex<R>where
R: RefUnwindSafe,
impl<R> Send for UnitIndex<R>where
R: Send,
impl<R> Sync for UnitIndex<R>where
R: Sync,
impl<R> Unpin for UnitIndex<R>where
R: Unpin,
impl<R> UnwindSafe for UnitIndex<R>where
R: UnwindSafe,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)