pub struct UnitIndex<R: Reader> {
version: u16,
section_count: u32,
unit_count: u32,
slot_count: u32,
hash_ids: R,
hash_rows: R,
sections: [IndexSectionId; 8],
offsets: R,
sizes: R,
}
Expand description
The partially parsed index from a DebugCuIndex
or DebugTuIndex
.
Fields§
§version: u16
§section_count: u32
§unit_count: u32
§slot_count: u32
§hash_ids: R
§hash_rows: R
§sections: [IndexSectionId; 8]
§offsets: R
§sizes: R
Implementations§
source§impl<R: Reader> UnitIndex<R>
impl<R: Reader> UnitIndex<R>
fn parse(input: R) -> Result<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
)