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§

source

type Word: Into<u64>

source

type HalfWord: Into<u32>

source

type Xcoff: FileHeader<SectionHeader = Self, Word = Self::Word>

source

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

Required Methods§

source

fn s_name(&self) -> &[u8; 8]

source

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

source

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

source

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

source

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

source

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

source

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

source

fn s_nreloc(&self) -> Self::HalfWord

source

fn s_nlnno(&self) -> Self::HalfWord

source

fn s_flags(&self) -> u32

source

fn relocations<'data, R: ReadRef<'data>>( &self, data: R, ) -> Result<&'data [Self::Rel]>

Read the relocations.

Provided Methods§

source

fn name(&self) -> &[u8]

Return the section name.

source

fn file_range(&self) -> Option<(u64, u64)>

Return the offset and size of the section in the file.

source

fn data<'data, R: ReadRef<'data>>(&self, data: R) -> Result<&'data [u8], ()>

Return the section data.

Returns Ok(&[]) if the section has no data. Returns Err for invalid values.

Object Safety§

This trait is not object safe.

Implementors§