Struct goblin::mach::symbols::Symbols [−][src]
A zero-copy “nlist” style symbol table (“stab”), including the string table
Implementations
impl<'a> Symbols<'a>
[src]
pub fn new(
bytes: &'a [u8],
start: usize,
count: usize,
strtab: usize
) -> Result<Symbols<'a>>
[src]
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>>
[src]
bytes: &'a [u8],
symtab: &SymtabCommand,
ctx: Ctx
) -> Result<Symbols<'a>>
pub fn iter(&self) -> SymbolIterator<'a>ⓘNotable traits for SymbolIterator<'a>
impl<'a> Iterator for SymbolIterator<'a> type Item = Result<(&'a str, Nlist)>;
[src]
Notable traits for SymbolIterator<'a>
impl<'a> Iterator for SymbolIterator<'a> type Item = Result<(&'a str, Nlist)>;
pub fn get(&self, index: usize) -> Result<(&'a str, Nlist)>
[src]
Parses a single Nlist symbol from the binary, with its accompanying name
Trait Implementations
impl<'a> Debug for Symbols<'a>
[src]
impl<'a, 'b> IntoIterator for &'b Symbols<'a>
[src]
type Item = <SymbolIterator<'a> as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = SymbolIterator<'a>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
impl<'a, T: ?Sized> TryFromCtx<'a, SymbolsCtx, T> for Symbols<'a> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
type Error = Error
fn try_from_ctx(
bytes: &'a T,
SymbolsCtx { nsyms: nsyms, strtab: strtab, ctx: ctx }: SymbolsCtx
) -> Result<(Self, usize)>
[src]
bytes: &'a T,
SymbolsCtx { nsyms: nsyms, strtab: strtab, ctx: ctx }: SymbolsCtx
) -> Result<(Self, usize)>
Auto Trait Implementations
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,