Enum me3_binary::Program
source · [−]Variants
File(PeFile<'a>)
Mapping(PeView<'a>)
Implementations
Trait Implementations
sourceimpl<'a> Pe<'a> for Program<'a>
impl<'a> Pe<'a> for Program<'a>
sourcefn dos_header(self) -> &'a IMAGE_DOS_HEADER
fn dos_header(self) -> &'a IMAGE_DOS_HEADER
Returns the DOS header.
sourcefn dos_image(self) -> &'a [u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
fn dos_image(self) -> &'a [u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Returns the DOS image. Read more
sourcefn nt_headers(self) -> &'a IMAGE_NT_HEADERS64
fn nt_headers(self) -> &'a IMAGE_NT_HEADERS64
Returns the NT headers.
sourcefn file_header(self) -> &'a IMAGE_FILE_HEADER
fn file_header(self) -> &'a IMAGE_FILE_HEADER
Returns the file header.
sourcefn optional_header(self) -> &'a IMAGE_OPTIONAL_HEADER64
fn optional_header(self) -> &'a IMAGE_OPTIONAL_HEADER64
Returns the optional header.
sourcefn data_directory(self) -> &'a [IMAGE_DATA_DIRECTORY]
fn data_directory(self) -> &'a [IMAGE_DATA_DIRECTORY]
Returns the data directory.
sourcefn section_headers(self) -> &'a SectionHeaders
fn section_headers(self) -> &'a SectionHeaders
Returns the section headers.
sourcefn rva_to_file_offset(self, rva: u32) -> Result<usize, Error>
fn rva_to_file_offset(self, rva: u32) -> Result<usize, Error>
Converts a relative virtual address to file offset. Read more
sourcefn file_offset_to_rva(self, file_offset: usize) -> Result<u32, Error>
fn file_offset_to_rva(self, file_offset: usize) -> Result<u32, Error>
Converts a file offset to relative virtual address. Read more
sourcefn rva_to_va(self, rva: u32) -> Result<u64, Error>
fn rva_to_va(self, rva: u32) -> Result<u64, Error>
Converts from relative virtual address to virtual address. Read more
sourcefn va_to_rva(self, va: u64) -> Result<u32, Error>
fn va_to_rva(self, va: u64) -> Result<u32, Error>
Converts from virtual address to relative virtual address. Read more
sourcefn slice(
&self,
rva: u32,
min_size_of: usize,
align: usize
) -> Result<&'a [u8], Error>
fn slice(
&self,
rva: u32,
min_size_of: usize,
align: usize
) -> Result<&'a [u8], Error>
Slices the image at the specified rva. Read more
sourcefn slice_bytes(self, rva: u32) -> Result<&'a [u8], Error>
fn slice_bytes(self, rva: u32) -> Result<&'a [u8], Error>
Slices the image at the specified rva returning a byte slice with no alignment or minimum size. Read more
sourcefn get_section_bytes(
self,
section_header: &IMAGE_SECTION_HEADER
) -> Result<&'a [u8], Error>
fn get_section_bytes(
self,
section_header: &IMAGE_SECTION_HEADER
) -> Result<&'a [u8], Error>
Gets the bytes defined by a section header in this image. Read more
sourcefn read(
&self,
va: u64,
min_size_of: usize,
align: usize
) -> Result<&'a [u8], Error>
fn read(
&self,
va: u64,
min_size_of: usize,
align: usize
) -> Result<&'a [u8], Error>
Reads the image at the specified va. Read more
sourcefn read_bytes(self, va: u64) -> Result<&'a [u8], Error>
fn read_bytes(self, va: u64) -> Result<&'a [u8], Error>
Reads the image at the specified va returning a byte slice with no alignment or minimum size. Read more
sourcefn derva_copy<T>(self, rva: u32) -> Result<T, Error>where
T: Copy + Pod,
fn derva_copy<T>(self, rva: u32) -> Result<T, Error>where
T: Copy + Pod,
Reads an unaligned pod
T
.sourcefn derva_into<T>(self, rva: u32, dest: &mut T) -> Result<(), Error>where
T: Pod + ?Sized,
fn derva_into<T>(self, rva: u32, dest: &mut T) -> Result<(), Error>where
T: Pod + ?Sized,
Reads and byte-wise copies the content to the given destination. Read more
sourcefn derva_slice<T>(self, rva: u32, len: usize) -> Result<&'a [T], Error>where
T: Pod,
fn derva_slice<T>(self, rva: u32, len: usize) -> Result<&'a [T], Error>where
T: Pod,
Reads an array of pod
T
with given length.sourcefn derva_slice_f<T, F>(self, rva: u32, f: F) -> Result<&'a [T], Error>where
T: Pod,
F: FnMut(&'a T) -> bool,
fn derva_slice_f<T, F>(self, rva: u32, f: F) -> Result<&'a [T], Error>where
T: Pod,
F: FnMut(&'a T) -> bool,
Reads an array of pod
T
. Read moresourcefn derva_slice_s<T>(self, rva: u32, sentinel: T) -> Result<&'a [T], Error>where
T: PartialEq<T> + Pod,
fn derva_slice_s<T>(self, rva: u32, sentinel: T) -> Result<&'a [T], Error>where
T: PartialEq<T> + Pod,
Reads an array of pod
T
. Read moresourcefn derva_string<T>(self, rva: u32) -> Result<&'a T, Error>where
T: FromBytes + ?Sized,
fn derva_string<T>(self, rva: u32) -> Result<&'a T, Error>where
T: FromBytes + ?Sized,
Reads a string.
sourcefn deref<T>(self, ptr: Ptr<T>) -> Result<&'a T, Error>where
T: Pod,
fn deref<T>(self, ptr: Ptr<T>) -> Result<&'a T, Error>where
T: Pod,
Dereferences the pointer to a pod
T
.sourcefn deref_copy<T>(self, ptr: Ptr<T>) -> Result<T, Error>where
T: Copy + Pod,
fn deref_copy<T>(self, ptr: Ptr<T>) -> Result<T, Error>where
T: Copy + Pod,
Dereferences the pointer to an unaligned pod
T
.sourcefn deref_into<T>(self, ptr: Ptr<T>, dest: &mut T) -> Result<(), Error>where
T: Pod + ?Sized,
fn deref_into<T>(self, ptr: Ptr<T>, dest: &mut T) -> Result<(), Error>where
T: Pod + ?Sized,
Reads and byte-wise copies the content to the given destination. Read more
sourcefn deref_slice<T>(self, ptr: Ptr<[T]>, len: usize) -> Result<&'a [T], Error>where
T: Pod,
fn deref_slice<T>(self, ptr: Ptr<[T]>, len: usize) -> Result<&'a [T], Error>where
T: Pod,
Reads an array of pod
T
with given length.sourcefn deref_slice_f<T, F>(self, ptr: Ptr<[T]>, f: F) -> Result<&'a [T], Error>where
T: Pod,
F: FnMut(&'a T) -> bool,
fn deref_slice_f<T, F>(self, ptr: Ptr<[T]>, f: F) -> Result<&'a [T], Error>where
T: Pod,
F: FnMut(&'a T) -> bool,
Reads an array of pod
T
. Read moresourcefn deref_slice_s<T>(self, ptr: Ptr<[T]>, sentinel: T) -> Result<&'a [T], Error>where
T: PartialEq<T> + Pod,
fn deref_slice_s<T>(self, ptr: Ptr<[T]>, sentinel: T) -> Result<&'a [T], Error>where
T: PartialEq<T> + Pod,
Reads an array of pod
T
. Read moresourcefn deref_c_str(self, ptr: Ptr<CStr>) -> Result<&'a CStr, Error>
fn deref_c_str(self, ptr: Ptr<CStr>) -> Result<&'a CStr, Error>
Dereferences the pointer to a nul-terminated C string.
sourcefn deref_string<T>(self, ptr: Ptr<T>) -> Result<&'a T, Error>where
T: FromBytes + ?Sized,
fn deref_string<T>(self, ptr: Ptr<T>) -> Result<&'a T, Error>where
T: FromBytes + ?Sized,
Dereferences the pointer to a string.
sourcefn rich_structure(self) -> Result<RichStructure<'a>, Error>
fn rich_structure(self) -> Result<RichStructure<'a>, Error>
Returns the Rich structure.
sourcefn base_relocs(self) -> Result<BaseRelocs<'a>, Error>
fn base_relocs(self) -> Result<BaseRelocs<'a>, Error>
Gets the Base Relocations Directory. Read more
sourcefn load_config(self) -> Result<LoadConfig<'a, Self>, Error>
fn load_config(self) -> Result<LoadConfig<'a, Self>, Error>
Gets the Load Config Directory. Read more
sourcefn exception(self) -> Result<Exception<'a, Self>, Error>
fn exception(self) -> Result<Exception<'a, Self>, Error>
Gets the Exception Directory. Read more
impl<'a> Copy for Program<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for Program<'a>
impl<'a> Send for Program<'a>
impl<'a> Sync for Program<'a>
impl<'a> Unpin for Program<'a>
impl<'a> UnwindSafe for Program<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more