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: RImplementations§
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