Struct elf_riscv32::StringTable
source · [−]pub struct StringTable<'a>(_);
Implementations
sourceimpl<'a> StringTable<'a>
impl<'a> StringTable<'a>
sourcepub fn new(section: Section<'a>) -> Result<Self>
pub fn new(section: Section<'a>) -> Result<Self>
Coerce a Section into a string table.
The section must be of type SHT_STRTAB
and have the SHF_STRINGS
flag.
pub fn get_str(self, index: u32) -> Result<&'a str>
sourcepub fn get_bytes(self, index: u32) -> Result<&'a [u8]>
pub fn get_bytes(self, index: u32) -> Result<&'a [u8]>
Get the byte slice of a string in the string table, not including the null terminator.
Trait Implementations
sourceimpl<'a> Clone for StringTable<'a>
impl<'a> Clone for StringTable<'a>
sourcefn clone(&self) -> StringTable<'a>
fn clone(&self) -> StringTable<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for StringTable<'a>
impl<'a> Debug for StringTable<'a>
impl<'a> Copy for StringTable<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for StringTable<'a>
impl<'a> Send for StringTable<'a>
impl<'a> Sync for StringTable<'a>
impl<'a> Unpin for StringTable<'a>
impl<'a> UnwindSafe for StringTable<'a>
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