object::read

Trait ObjectSymbolTable

source
pub trait ObjectSymbolTable<'data>: Sealed {
    type Symbol: ObjectSymbol<'data>;
    type SymbolIterator: Iterator<Item = Self::Symbol>;

    // Required methods
    fn symbols(&self) -> Self::SymbolIterator;
    fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol>;
}
Expand description

A symbol table in an Object.

This trait is part of the unified read API.

Required Associated Types§

source

type Symbol: ObjectSymbol<'data>

A symbol table entry.

source

type SymbolIterator: Iterator<Item = Self::Symbol>

An iterator for the symbols in a symbol table.

Required Methods§

source

fn symbols(&self) -> Self::SymbolIterator

Get an iterator for the symbols in the table.

This may skip over symbols that are malformed or unsupported.

source

fn symbol_by_index(&self, index: SymbolIndex) -> Result<Self::Symbol>

Get the symbol at the given index.

The meaning of the index depends on the object file.

Returns an error if the index is invalid.

Implementors§

source§

impl<'data, 'file> ObjectSymbolTable<'data> for WasmSymbolTable<'data, 'file>

source§

type Symbol = WasmSymbol<'data, 'file>

source§

type SymbolIterator = WasmSymbolIterator<'data, 'file>

source§

impl<'data, 'file, Elf: FileHeader, R: ReadRef<'data>> ObjectSymbolTable<'data> for ElfSymbolTable<'data, 'file, Elf, R>

source§

type Symbol = ElfSymbol<'data, 'file, Elf, R>

source§

type SymbolIterator = ElfSymbolIterator<'data, 'file, Elf, R>

source§

impl<'data, 'file, Mach, R> ObjectSymbolTable<'data> for MachOSymbolTable<'data, 'file, Mach, R>
where Mach: MachHeader, R: ReadRef<'data>,

source§

type Symbol = MachOSymbol<'data, 'file, Mach, R>

source§

type SymbolIterator = MachOSymbolIterator<'data, 'file, Mach, R>

source§

impl<'data, 'file, R: ReadRef<'data>> ObjectSymbolTable<'data> for SymbolTable<'data, 'file, R>

source§

type Symbol = Symbol<'data, 'file, R>

source§

type SymbolIterator = SymbolIterator<'data, 'file, R>

source§

impl<'data, 'file, R: ReadRef<'data>, Coff: CoffHeader> ObjectSymbolTable<'data> for CoffSymbolTable<'data, 'file, R, Coff>

source§

type Symbol = CoffSymbol<'data, 'file, R, Coff>

source§

type SymbolIterator = CoffSymbolIterator<'data, 'file, R, Coff>

source§

impl<'data, 'file, Xcoff: FileHeader, R: ReadRef<'data>> ObjectSymbolTable<'data> for XcoffSymbolTable<'data, 'file, Xcoff, R>

source§

type Symbol = XcoffSymbol<'data, 'file, Xcoff, R>

source§

type SymbolIterator = XcoffSymbolIterator<'data, 'file, Xcoff, R>