Trait object::read::xcoff::SectionHeader
source · pub trait SectionHeader: Debug + Pod {
type Word: Into<u64>;
type HalfWord: Into<u32>;
type Xcoff: FileHeader<SectionHeader = Self, Word = Self::Word>;
type Rel: Rel<Word = Self::Word>;
Show 14 methods
// Required methods
fn s_name(&self) -> &[u8; 8];
fn s_paddr(&self) -> Self::Word;
fn s_vaddr(&self) -> Self::Word;
fn s_size(&self) -> Self::Word;
fn s_scnptr(&self) -> Self::Word;
fn s_relptr(&self) -> Self::Word;
fn s_lnnoptr(&self) -> Self::Word;
fn s_nreloc(&self) -> Self::HalfWord;
fn s_nlnno(&self) -> Self::HalfWord;
fn s_flags(&self) -> u32;
fn relocations<'data, R: ReadRef<'data>>(
&self,
data: R,
) -> Result<&'data [Self::Rel]>;
// Provided methods
fn name(&self) -> &[u8] ⓘ { ... }
fn file_range(&self) -> Option<(u64, u64)> { ... }
fn data<'data, R: ReadRef<'data>>(&self, data: R) -> Result<&'data [u8], ()> { ... }
}
Expand description
A trait for generic access to xcoff::SectionHeader32
and xcoff::SectionHeader64
.
Required Associated Types§
type Word: Into<u64>
type HalfWord: Into<u32>
type Xcoff: FileHeader<SectionHeader = Self, Word = Self::Word>
type Rel: Rel<Word = Self::Word>
Required Methods§
fn s_name(&self) -> &[u8; 8]
fn s_paddr(&self) -> Self::Word
fn s_vaddr(&self) -> Self::Word
fn s_size(&self) -> Self::Word
fn s_scnptr(&self) -> Self::Word
fn s_relptr(&self) -> Self::Word
fn s_lnnoptr(&self) -> Self::Word
fn s_nreloc(&self) -> Self::HalfWord
fn s_nlnno(&self) -> Self::HalfWord
fn s_flags(&self) -> u32
sourcefn relocations<'data, R: ReadRef<'data>>(
&self,
data: R,
) -> Result<&'data [Self::Rel]>
fn relocations<'data, R: ReadRef<'data>>( &self, data: R, ) -> Result<&'data [Self::Rel]>
Read the relocations.
Provided Methods§
sourcefn file_range(&self) -> Option<(u64, u64)>
fn file_range(&self) -> Option<(u64, u64)>
Return the offset and size of the section in the file.
Object Safety§
This trait is not object safe.