#[repr(C)]pub struct SectionTable {
pub name: [u8; 8],
pub real_name: Option<String>,
pub virtual_size: u32,
pub virtual_address: u32,
pub size_of_raw_data: u32,
pub pointer_to_raw_data: u32,
pub pointer_to_relocations: u32,
pub pointer_to_linenumbers: u32,
pub number_of_relocations: u16,
pub number_of_linenumbers: u16,
pub characteristics: u32,
}
Fields§
§name: [u8; 8]
§real_name: Option<String>
§virtual_size: u32
§virtual_address: u32
§size_of_raw_data: u32
§pointer_to_raw_data: u32
§pointer_to_relocations: u32
§pointer_to_linenumbers: u32
§number_of_relocations: u16
§number_of_linenumbers: u16
§characteristics: u32
Implementations§
Source§impl SectionTable
impl SectionTable
pub fn parse( bytes: &[u8], offset: &mut usize, string_table_offset: usize, ) -> Result<SectionTable, Error>
pub fn data<'a, 'b>(
&'a self,
pe_bytes: &'b [u8],
) -> Result<Option<Cow<'a, [u8]>>, Error>where
'b: 'a,
pub fn name_offset(&self) -> Result<Option<usize>, Error>
pub fn set_name_offset(&mut self, idx: usize) -> Result<(), Error>
pub fn name(&self) -> Result<&str, Error>
pub fn relocations<'a>(&self, bytes: &'a [u8]) -> Result<Relocations<'a>, Error>
Sourcepub fn overlaps_with(&self, another_section: &SectionTable) -> bool
pub fn overlaps_with(&self, another_section: &SectionTable) -> bool
Tests if another_section
on-disk ranges will collide.
Trait Implementations§
Source§impl Clone for SectionTable
impl Clone for SectionTable
Source§fn clone(&self) -> SectionTable
fn clone(&self) -> SectionTable
Returns a duplicate 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 Debug for SectionTable
impl Debug for SectionTable
Source§impl Default for SectionTable
impl Default for SectionTable
Source§fn default() -> SectionTable
fn default() -> SectionTable
Returns the “default value” for a type. Read more
Source§impl IntoCtx<Endian> for &SectionTable
impl IntoCtx<Endian> for &SectionTable
Source§impl PartialEq for SectionTable
impl PartialEq for SectionTable
Source§impl TryIntoCtx<Endian> for &SectionTable
impl TryIntoCtx<Endian> for &SectionTable
type Error = Error
fn try_into_ctx( self, bytes: &mut [u8], ctx: Endian, ) -> Result<usize, <&SectionTable as TryIntoCtx<Endian>>::Error>
impl StructuralPartialEq for SectionTable
Auto Trait Implementations§
impl Freeze for SectionTable
impl RefUnwindSafe for SectionTable
impl Send for SectionTable
impl Sync for SectionTable
impl Unpin for SectionTable
impl UnwindSafe for SectionTable
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§impl<I, T> ExtractContext<I, ()> for T
impl<I, T> ExtractContext<I, ()> for T
Source§fn extract_context(self, _original_input: I)
fn extract_context(self, _original_input: I)
Given the context attached to a nom error, and given the original
input to the nom parser, extract more the useful context information. Read more
Source§impl<I> RecreateContext<I> for I
impl<I> RecreateContext<I> for I
Source§fn recreate_context(_original_input: I, tail: I) -> I
fn recreate_context(_original_input: I, tail: I) -> I
Given the original input, as well as the context reported by nom,
recreate a context in the original string where the error occurred. Read more