pub struct UnitTable { /* private fields */ }Expand description
A table of units that will be stored in the .debug_info section.
Implementations§
Source§impl UnitTable
impl UnitTable
Sourcepub fn add(&mut self, unit: Unit) -> UnitId
pub fn add(&mut self, unit: Unit) -> UnitId
Create a new unit and add it to the table.
address_size must be in bytes.
Returns the UnitId of the new unit.
Sourcepub fn iter_mut(&mut self) -> impl Iterator<Item = (UnitId, &mut Unit)>
pub fn iter_mut(&mut self) -> impl Iterator<Item = (UnitId, &mut Unit)>
Get a mutable iterator for the units.
Sourcepub fn write<W: Writer>(
&mut self,
sections: &mut Sections<W>,
line_strings: &mut LineStringTable,
strings: &mut StringTable,
) -> Result<()>
pub fn write<W: Writer>( &mut self, sections: &mut Sections<W>, line_strings: &mut LineStringTable, strings: &mut StringTable, ) -> Result<()>
Write the units to the given sections.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UnitTable
impl RefUnwindSafe for UnitTable
impl Send for UnitTable
impl Sync for UnitTable
impl Unpin for UnitTable
impl UnsafeUnpin for UnitTable
impl UnwindSafe for UnitTable
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