Struct gimli::write::StringTable [−][src]
pub struct StringTable { /* fields omitted */ }
A table of strings that will be stored in a .debug_str
section.
Implementations
impl StringTable
[src]
impl StringTable
[src]pub fn add<T>(&mut self, bytes: T) -> StringId where
T: Into<Vec<u8>>,
[src]
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.
pub fn count(&self) -> usize
[src]
Return the number of strings in the table.
pub fn get(&self, id: StringId) -> &[u8]ⓘ
[src]
pub fn write<W: Writer>(&self, w: &mut DebugStr<W>) -> Result<DebugStrOffsets>
[src]
Write the string table to the .debug_str
section.
Returns the offsets at which the strings are written.
Trait Implementations
impl Default for StringTable
[src]
impl Default for StringTable
[src]fn default() -> StringTable
[src]
Auto Trait Implementations
impl RefUnwindSafe for StringTable
impl RefUnwindSafe for StringTable
impl Send for StringTable
impl Send for StringTable
impl Sync for StringTable
impl Sync for StringTable
impl Unpin for StringTable
impl Unpin for StringTable
impl UnwindSafe for StringTable
impl UnwindSafe for StringTable