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]

pub fn add<T>(&mut self, bytes: T) -> StringId where
    T: Into<Vec<u8>>, 
[src]

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]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

Get a reference to a string in the table.

Panics

Panics if id is invalid.

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 Debug for StringTable[src]

impl Default for StringTable[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.