object::read::xcoff

Trait FileHeader

Source
pub trait FileHeader: Debug + Pod {
    type Word: Into<u64>;
    type AuxHeader: AuxHeader<Word = Self::Word>;
    type SectionHeader: SectionHeader<Word = Self::Word, Rel = Self::Rel>;
    type Symbol: Symbol<Word = Self::Word>;
    type FileAux: FileAux;
    type CsectAux: CsectAux;
    type Rel: Rel<Word = Self::Word>;

Show 13 methods // Required methods fn is_type_64(&self) -> bool; fn f_magic(&self) -> u16; fn f_nscns(&self) -> u16; fn f_timdat(&self) -> u32; fn f_symptr(&self) -> Self::Word; fn f_nsyms(&self) -> u32; fn f_opthdr(&self) -> u16; fn f_flags(&self) -> u16; // Provided methods fn parse<'data, R: ReadRef<'data>>( data: R, offset: &mut u64, ) -> Result<&'data Self> { ... } fn is_supported(&self) -> bool { ... } fn aux_header<'data, R: ReadRef<'data>>( &self, data: R, offset: &mut u64, ) -> Result<Option<&'data Self::AuxHeader>> { ... } fn sections<'data, R: ReadRef<'data>>( &self, data: R, offset: &mut u64, ) -> Result<SectionTable<'data, Self>> { ... } fn symbols<'data, R: ReadRef<'data>>( &self, data: R, ) -> Result<SymbolTable<'data, Self, R>> { ... }
}
Expand description

A trait for generic access to xcoff::FileHeader32 and xcoff::FileHeader64.

Required Associated Types§

Source

type Word: Into<u64>

Source

type AuxHeader: AuxHeader<Word = Self::Word>

Source

type SectionHeader: SectionHeader<Word = Self::Word, Rel = Self::Rel>

Source

type Symbol: Symbol<Word = Self::Word>

Source

type FileAux: FileAux

Source

type CsectAux: CsectAux

Source

type Rel: Rel<Word = Self::Word>

Required Methods§

Source

fn is_type_64(&self) -> bool

Return true if this type is a 64-bit header.

Source

fn f_magic(&self) -> u16

Source

fn f_nscns(&self) -> u16

Source

fn f_timdat(&self) -> u32

Source

fn f_symptr(&self) -> Self::Word

Source

fn f_nsyms(&self) -> u32

Source

fn f_opthdr(&self) -> u16

Source

fn f_flags(&self) -> u16

Provided Methods§

Source

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

Read the file header.

Also checks that the magic field in the file header is a supported format.

Source

fn is_supported(&self) -> bool

Source

fn aux_header<'data, R: ReadRef<'data>>( &self, data: R, offset: &mut u64, ) -> Result<Option<&'data Self::AuxHeader>>

Read the auxiliary file header.

Source

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

Read the section table.

Source

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

Return the symbol table.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§