Struct object::read::xcoff::SectionTable

source ·
pub struct SectionTable<'data, Xcoff: FileHeader> { /* private fields */ }
Expand description

The table of section headers in an XCOFF file.

Returned by FileHeader::sections.

Implementations§

source§

impl<'data, Xcoff> SectionTable<'data, Xcoff>
where Xcoff: FileHeader,

source

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

Parse the section table.

data must be the entire file data. offset must be after the optional file header.

source

pub fn iter(&self) -> Iter<'data, Xcoff::SectionHeader>

Iterate over the section headers.

source

pub fn is_empty(&self) -> bool

Return true if the section table is empty.

source

pub fn len(&self) -> usize

The number of section headers.

source

pub fn section( &self, index: SectionIndex, ) -> Result<&'data Xcoff::SectionHeader>

Return the section header at the given index.

The index is 1-based.

Trait Implementations§

source§

impl<'data, Xcoff: Clone + FileHeader> Clone for SectionTable<'data, Xcoff>
where Xcoff::SectionHeader: Clone,

source§

fn clone(&self) -> SectionTable<'data, Xcoff>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'data, Xcoff: Debug + FileHeader> Debug for SectionTable<'data, Xcoff>
where Xcoff::SectionHeader: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'data, Xcoff> Default for SectionTable<'data, Xcoff>
where Xcoff: FileHeader,

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'data, Xcoff: Copy + FileHeader> Copy for SectionTable<'data, Xcoff>
where Xcoff::SectionHeader: Copy,

Auto Trait Implementations§

§

impl<'data, Xcoff> Freeze for SectionTable<'data, Xcoff>

§

impl<'data, Xcoff> RefUnwindSafe for SectionTable<'data, Xcoff>

§

impl<'data, Xcoff> Send for SectionTable<'data, Xcoff>
where <Xcoff as FileHeader>::SectionHeader: Sync,

§

impl<'data, Xcoff> Sync for SectionTable<'data, Xcoff>
where <Xcoff as FileHeader>::SectionHeader: Sync,

§

impl<'data, Xcoff> Unpin for SectionTable<'data, Xcoff>

§

impl<'data, Xcoff> UnwindSafe for SectionTable<'data, Xcoff>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.