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,
impl<'data, Xcoff> SectionTable<'data, Xcoff>where
Xcoff: FileHeader,
sourcepub fn parse<R: ReadRef<'data>>(
header: &Xcoff,
data: R,
offset: &mut u64,
) -> Result<Self>
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.
sourcepub fn iter(&self) -> Iter<'data, Xcoff::SectionHeader>
pub fn iter(&self) -> Iter<'data, Xcoff::SectionHeader>
Iterate over the section headers.
sourcepub fn section(
&self,
index: SectionIndex,
) -> Result<&'data Xcoff::SectionHeader>
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,
impl<'data, Xcoff: Clone + FileHeader> Clone for SectionTable<'data, Xcoff>where
Xcoff::SectionHeader: Clone,
source§fn clone(&self) -> SectionTable<'data, Xcoff>
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)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'data, Xcoff: Debug + FileHeader> Debug for SectionTable<'data, Xcoff>where
Xcoff::SectionHeader: Debug,
impl<'data, Xcoff: Debug + FileHeader> Debug for SectionTable<'data, Xcoff>where
Xcoff::SectionHeader: Debug,
source§impl<'data, Xcoff> Default for SectionTable<'data, Xcoff>where
Xcoff: FileHeader,
impl<'data, Xcoff> Default for SectionTable<'data, Xcoff>where
Xcoff: FileHeader,
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>
impl<'data, Xcoff> Sync for SectionTable<'data, Xcoff>
impl<'data, Xcoff> Unpin for SectionTable<'data, Xcoff>
impl<'data, Xcoff> UnwindSafe for SectionTable<'data, Xcoff>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)