pub struct SectionTable<'a> {
sections: &'a [SectionHeader],
}Expand description
Section table - array of section headers
Fields§
§sections: &'a [SectionHeader]Implementations§
Source§impl<'a> SectionTable<'a>
impl<'a> SectionTable<'a>
Sourcepub unsafe fn parse(
data: *const u8,
offset: usize,
count: usize,
image_size: usize,
) -> PeResult<Self>
pub unsafe fn parse( data: *const u8, offset: usize, count: usize, image_size: usize, ) -> PeResult<Self>
Parse section table from PE data
§Safety
Caller must ensure data+offset points to valid section headers
Sourcepub fn find_reloc_section(&self) -> Option<&SectionHeader>
pub fn find_reloc_section(&self) -> Option<&SectionHeader>
Find the .reloc section
Sourcepub fn get(&self, index: usize) -> Option<&SectionHeader>
pub fn get(&self, index: usize) -> Option<&SectionHeader>
Get section by index
Sourcepub fn iter(&self) -> impl Iterator<Item = &SectionHeader>
pub fn iter(&self) -> impl Iterator<Item = &SectionHeader>
Iterator over all sections
Auto Trait Implementations§
impl<'a> Freeze for SectionTable<'a>
impl<'a> RefUnwindSafe for SectionTable<'a>
impl<'a> Send for SectionTable<'a>
impl<'a> Sync for SectionTable<'a>
impl<'a> Unpin for SectionTable<'a>
impl<'a> UnwindSafe for SectionTable<'a>
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