pub struct Symbols<'a> { /* private fields */ }
Expand description
A zero-copy “nlist” style symbol table (“stab”), including the string table
Implementations§
source§impl<'a> Symbols<'a>
impl<'a> Symbols<'a>
sourcepub fn new(
bytes: &'a [u8],
start: usize,
count: usize,
strtab: usize
) -> Result<Symbols<'a>>
pub fn new( bytes: &'a [u8], start: usize, count: usize, strtab: usize ) -> Result<Symbols<'a>>
Creates a new symbol table with count
elements, from the start
offset, using the string table at strtab
, with a default ctx.
Beware, this will provide incorrect results if you construct this on a 32-bit mach binary, using a 64-bit machine; use parse
instead if you want 32/64 bit support
pub fn parse( bytes: &'a [u8], symtab: &SymtabCommand, ctx: Ctx ) -> Result<Symbols<'a>>
pub fn iter(&self) -> SymbolIterator<'a> ⓘ
Trait Implementations§
source§impl<'a, 'b> IntoIterator for &'b Symbols<'a>
impl<'a, 'b> IntoIterator for &'b Symbols<'a>
source§impl<'a, T> TryFromCtx<'a, SymbolsCtx, T> for Symbols<'a>
impl<'a, T> TryFromCtx<'a, SymbolsCtx, T> for Symbols<'a>
type Error = Error
fn try_from_ctx(bytes: &'a T, _: SymbolsCtx) -> Result<(Self, usize)>
Auto Trait Implementations§
impl<'a> Freeze for Symbols<'a>
impl<'a> RefUnwindSafe for Symbols<'a>
impl<'a> Send for Symbols<'a>
impl<'a> Sync for Symbols<'a>
impl<'a> Unpin for Symbols<'a>
impl<'a> UnwindSafe for Symbols<'a>
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