Trait object::read::xcoff::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§
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>
Required Methods§
sourcefn is_type_64(&self) -> bool
fn is_type_64(&self) -> bool
Return true if this type is a 64-bit header.
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§
sourcefn parse<'data, R: ReadRef<'data>>(
data: R,
offset: &mut u64,
) -> Result<&'data Self>
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.
fn is_supported(&self) -> bool
sourcefn aux_header<'data, R: ReadRef<'data>>(
&self,
data: R,
offset: &mut u64,
) -> Result<Option<&'data Self::AuxHeader>>
fn aux_header<'data, R: ReadRef<'data>>( &self, data: R, offset: &mut u64, ) -> Result<Option<&'data Self::AuxHeader>>
Read the auxiliary file header.
sourcefn sections<'data, R: ReadRef<'data>>(
&self,
data: R,
offset: &mut u64,
) -> Result<SectionTable<'data, Self>>
fn sections<'data, R: ReadRef<'data>>( &self, data: R, offset: &mut u64, ) -> Result<SectionTable<'data, Self>>
Read the section table.
sourcefn symbols<'data, R: ReadRef<'data>>(
&self,
data: R,
) -> Result<SymbolTable<'data, Self, R>>
fn symbols<'data, R: ReadRef<'data>>( &self, data: R, ) -> Result<SymbolTable<'data, Self, R>>
Return the symbol table.
Object Safety§
This trait is not object safe.