pub struct UnitIndex<R: Reader> { /* private fields */ }
Expand description
The partially parsed index from a DebugCuIndex
or DebugTuIndex
.
Implementations
sourceimpl<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> 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more