Skip to main content

BinaryProvider

Trait BinaryProvider 

Source
pub trait BinaryProvider: Send + Sync {
    // Required methods
    fn format(&self) -> BinaryFormat;
    fn architecture(&self) -> Architecture;
    fn section_data(&self, name: &str) -> Option<(&[u8], u64, SectionKind)>;
    fn symbol_table(&self) -> &SymbolTable;
    fn path(&self) -> &Path;
    fn sections(&self) -> &[SectionInfo];
    fn visit_sections(
        &self,
        visitor: &mut dyn FnMut(&str, SectionKind, u64, &[u8]) -> Result<()>,
    ) -> Result<()>;
}

Required Methods§

Source

fn format(&self) -> BinaryFormat

Source

fn architecture(&self) -> Architecture

Source

fn section_data(&self, name: &str) -> Option<(&[u8], u64, SectionKind)>

Returns (data, base_address, kind) for a named section.

Source

fn symbol_table(&self) -> &SymbolTable

Source

fn path(&self) -> &Path

Source

fn sections(&self) -> &[SectionInfo]

Source

fn visit_sections( &self, visitor: &mut dyn FnMut(&str, SectionKind, u64, &[u8]) -> Result<()>, ) -> Result<()>

Iterate over all sections yielding (name, kind, address, data).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§