pub struct SectionTable<'data> { /* private fields */ }Expand description
The table of section headers in a COFF or PE file.
Implementations
sourceimpl<'data> SectionTable<'data>
 
impl<'data> SectionTable<'data>
sourcepub fn parse(header: &ImageFileHeader, data: Bytes<'data>) -> Result<Self>
 
pub fn parse(header: &ImageFileHeader, data: Bytes<'data>) -> Result<Self>
Parse the section table.
data must be the data following the optional header.
sourcepub fn iter(&self) -> Iter<'data, ImageSectionHeader>
 
pub fn iter(&self) -> Iter<'data, ImageSectionHeader>
Iterate over the section headers.
Warning: sections indices start at 1.
sourcepub fn section(&self, index: usize) -> Result<&'data ImageSectionHeader>
 
pub fn section(&self, index: usize) -> Result<&'data ImageSectionHeader>
Return the section header at the given index.
The index is 1-based.
sourcepub fn section_by_name(
    &self, 
    strings: StringTable<'data>, 
    name: &[u8]
) -> Option<(usize, &'data ImageSectionHeader)>
 
pub fn section_by_name(
    &self, 
    strings: StringTable<'data>, 
    name: &[u8]
) -> Option<(usize, &'data ImageSectionHeader)>
Return the section header with the given name.
The returned index is 1-based.
Ignores sections with invalid names.
Trait Implementations
sourceimpl<'data> Clone for SectionTable<'data>
 
impl<'data> Clone for SectionTable<'data>
sourcefn clone(&self) -> SectionTable<'data>
 
fn clone(&self) -> SectionTable<'data>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<'data> Debug for SectionTable<'data>
 
impl<'data> Debug for SectionTable<'data>
sourceimpl<'data> Default for SectionTable<'data>
 
impl<'data> Default for SectionTable<'data>
sourcefn default() -> SectionTable<'data>
 
fn default() -> SectionTable<'data>
Returns the “default value” for a type. Read more
impl<'data> Copy for SectionTable<'data>
Auto Trait Implementations
impl<'data> RefUnwindSafe for SectionTable<'data>
impl<'data> Send for SectionTable<'data>
impl<'data> Sync for SectionTable<'data>
impl<'data> Unpin for SectionTable<'data>
impl<'data> UnwindSafe for SectionTable<'data>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
 
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
    T: Clone, 
 
impl<T> ToOwned for T where
    T: Clone, 
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
 
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
 
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more