Struct gimli::write::LineStringTable
source · [−]pub struct LineStringTable { /* private fields */ }
Expand description
A table of strings that will be stored in a .debug_line_str
section.
Implementations
sourceimpl LineStringTable
impl LineStringTable
sourcepub fn add<T>(&mut self, bytes: T) -> LineStringId where
T: Into<Vec<u8>>,
pub fn add<T>(&mut self, bytes: T) -> LineStringId where
T: Into<Vec<u8>>,
Add a string to the string table and return its id.
If the string already exists, then return the id of the existing string.
Panics
Panics if bytes
contains a null byte.
sourcepub fn get(&self, id: LineStringId) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn get(&self, id: LineStringId) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
sourcepub fn write<W: Writer>(
&self,
w: &mut DebugLineStr<W>
) -> Result<DebugLineStrOffsets>
pub fn write<W: Writer>(
&self,
w: &mut DebugLineStr<W>
) -> Result<DebugLineStrOffsets>
Write the string table to the .debug_str
section.
Returns the offsets at which the strings are written.
Trait Implementations
sourceimpl Debug for LineStringTable
impl Debug for LineStringTable
sourceimpl Default for LineStringTable
impl Default for LineStringTable
sourcefn default() -> LineStringTable
fn default() -> LineStringTable
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for LineStringTable
impl Send for LineStringTable
impl Sync for LineStringTable
impl Unpin for LineStringTable
impl UnwindSafe for LineStringTable
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