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§
type ImageSymbol: ImageSymbol
type ImageSymbolBytes: Debug + Pod
Required Methods§
sourcefn is_type_bigobj() -> bool
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.
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
Provided Methods§
sourcefn sections<'data, R: ReadRef<'data>>(
&self,
data: R,
offset: u64,
) -> Result<SectionTable<'data>>
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.
sourcefn symbols<'data, R: ReadRef<'data>>(
&self,
data: R,
) -> Result<SymbolTable<'data, R, Self>>
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.