Trait object::read::coff::CoffHeader

source ·
pub trait CoffHeader: Debug + Pod {
    type ImageSymbol: ImageSymbol;
    type ImageSymbolBytes: Debug + Pod;

    // Required methods
    fn is_type_bigobj() -> bool;
    fn machine(&self) -> u16;
    fn number_of_sections(&self) -> u32;
    fn pointer_to_symbol_table(&self) -> u32;
    fn number_of_symbols(&self) -> u32;
    fn characteristics(&self) -> u16;
    fn parse<'data, R: ReadRef<'data>>(
        data: R,
        offset: &mut u64,
    ) -> Result<&'data Self>;

    // Provided methods
    fn sections<'data, R: ReadRef<'data>>(
        &self,
        data: R,
        offset: u64,
    ) -> Result<SectionTable<'data>> { ... }
    fn symbols<'data, R: ReadRef<'data>>(
        &self,
        data: R,
    ) -> Result<SymbolTable<'data, R, Self>> { ... }
}
Expand description

A trait for generic access to pe::ImageFileHeader and pe::AnonObjectHeaderBigobj.

Required Associated Types§

Required Methods§

source

fn is_type_bigobj() -> bool

Return true if this type is pe::AnonObjectHeaderBigobj.

This is a property of the type, not a value in the header data.

source

fn machine(&self) -> u16

source

fn number_of_sections(&self) -> u32

source

fn pointer_to_symbol_table(&self) -> u32

source

fn number_of_symbols(&self) -> u32

source

fn characteristics(&self) -> u16

source

fn parse<'data, R: ReadRef<'data>>( data: R, offset: &mut u64, ) -> Result<&'data Self>

Read the file header.

data must be the entire file data. offset must be the file header offset. It is updated to point after the optional header, which is where the section headers are located.

Provided Methods§

source

fn sections<'data, R: ReadRef<'data>>( &self, data: R, offset: u64, ) -> Result<SectionTable<'data>>

Read the section table.

data must be the entire file data. offset must be after the optional file header.

source

fn symbols<'data, R: ReadRef<'data>>( &self, data: R, ) -> Result<SymbolTable<'data, R, Self>>

Read the symbol table and string table.

data must be the entire file data.

Object Safety§

This trait is not object safe.

Implementors§