Struct object::read::coff::SectionTable [−][src]
pub struct SectionTable<'data> { /* fields omitted */ }
The table of section headers in a COFF or PE file.
Implementations
impl<'data> SectionTable<'data>
[src]
impl<'data> SectionTable<'data>
[src]pub fn parse(header: &ImageFileHeader, data: Bytes<'data>) -> Result<Self>
[src][−]
Parse the section table.
data
must be the data following the optional header.
pub fn iter(&self) -> Iter<'data, ImageSectionHeader>
[src][−]
Iterate over the section headers.
Warning: sections indices start at 1.
pub fn is_empty(&self) -> bool
[src][−]
Return true if the section table is empty.
pub fn len(&self) -> usize
[src][−]
The number of section headers.
pub fn section(&self, index: usize) -> Result<&'data ImageSectionHeader>
[src][−]
Return the section header at the given index.
The index is 1-based.
pub fn section_by_name(
&self,
strings: StringTable<'data>,
name: &[u8]
) -> Option<(usize, &'data ImageSectionHeader)>
[src][−]
&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
impl<'data> Clone for SectionTable<'data>
[src]
impl<'data> Clone for SectionTable<'data>
[src]fn clone(&self) -> SectionTable<'data>
[src][−]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src][−]
impl<'data> Debug for SectionTable<'data>
[src]
impl<'data> Debug for SectionTable<'data>
[src]impl<'data> Default for SectionTable<'data>
[src]
impl<'data> Default for SectionTable<'data>
[src]