pub struct ExeReader<R> { /* private fields */ }Expand description
EXE structure, lazy reader for parsing PE format executable files.
Implementations§
Trait Implementations§
Source§impl<R: Read + Seek> PeReader<R> for ExeReader<R>
impl<R: Read + Seek> PeReader<R> for ExeReader<R>
Source§fn get_viewer(&mut self) -> &mut R
fn get_viewer(&mut self) -> &mut R
Get a mutable reference to the binary reader
Source§fn add_diagnostics(&mut self, error: impl Into<GaiaError>)
fn add_diagnostics(&mut self, error: impl Into<GaiaError>)
Get a mutable reference to diagnostics information
Source§fn get_section_headers(&mut self) -> Result<&[SectionHeader], GaiaError>
fn get_section_headers(&mut self) -> Result<&[SectionHeader], GaiaError>
Get cached section headers
Source§fn get_pe_header(&mut self) -> Result<&PeHeader, GaiaError>
fn get_pe_header(&mut self) -> Result<&PeHeader, GaiaError>
Read PE header information (generic implementation)
Source§fn get_program(&mut self) -> Result<&PeProgram, GaiaError>
fn get_program(&mut self) -> Result<&PeProgram, GaiaError>
Force read full PeProgram and cache the result
fn get_position(&mut self) -> Result<u64, GaiaError>where
R: Seek,
fn set_position(&mut self, offset: u64) -> Result<u64, GaiaError>where
R: Seek,
Source§fn rva_to_file_offset(
&self,
rva: u32,
sections: &[PeSection],
) -> Result<u32, GaiaError>
fn rva_to_file_offset( &self, rva: u32, sections: &[PeSection], ) -> Result<u32, GaiaError>
Convert RVA to file offset (generic implementation)
Source§fn parse_import_table(
&mut self,
header: &PeHeader,
sections: &[PeSection],
) -> Result<ImportTable, GaiaError>
fn parse_import_table( &mut self, header: &PeHeader, sections: &[PeSection], ) -> Result<ImportTable, GaiaError>
Parse import table (generic implementation)
Source§fn parse_export_table(
&mut self,
header: &PeHeader,
sections: &[PeSection],
) -> Result<ExportTable, GaiaError>
fn parse_export_table( &mut self, header: &PeHeader, sections: &[PeSection], ) -> Result<ExportTable, GaiaError>
Parse export table (generic implementation)
Source§impl<R: Read> Read for ExeReader<R>
impl<R: Read> Read for ExeReader<R>
Source§fn read(&mut self, buffer: &mut [u8]) -> Result<usize>
fn read(&mut self, buffer: &mut [u8]) -> Result<usize>
Pull some bytes from this source into the specified buffer, returning
how many bytes were read. Read more
1.36.0 · Source§fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
fn read_vectored(&mut self, bufs: &mut [IoSliceMut<'_>]) -> Result<usize, Error>
Like
read, except that it reads into a slice of buffers. Read moreSource§fn is_read_vectored(&self) -> bool
fn is_read_vectored(&self) -> bool
🔬This is a nightly-only experimental API. (
can_vector)1.0.0 · Source§fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
fn read_to_end(&mut self, buf: &mut Vec<u8>) -> Result<usize, Error>
Reads all bytes until EOF in this source, placing them into
buf. Read more1.0.0 · Source§fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
fn read_to_string(&mut self, buf: &mut String) -> Result<usize, Error>
Reads all bytes until EOF in this source, appending them to
buf. Read more1.6.0 · Source§fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
fn read_exact(&mut self, buf: &mut [u8]) -> Result<(), Error>
Reads the exact number of bytes required to fill
buf. Read moreSource§fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf)Pull some bytes from this source into the specified buffer. Read more
Source§fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
fn read_buf_exact(&mut self, cursor: BorrowedCursor<'_>) -> Result<(), Error>
🔬This is a nightly-only experimental API. (
read_buf)Reads the exact number of bytes required to fill
cursor. Read more1.0.0 · Source§fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Creates a “by reference” adapter for this instance of
Read. Read more1.0.0 · Source§fn chain<R>(self, next: R) -> Chain<Self, R>
fn chain<R>(self, next: R) -> Chain<Self, R>
Creates an adapter which will chain this stream with another. Read more
Source§impl<R: Seek> Seek for ExeReader<R>
impl<R: Seek> Seek for ExeReader<R>
Source§fn seek(&mut self, position: SeekFrom) -> Result<u64>
fn seek(&mut self, position: SeekFrom) -> Result<u64>
Seek to an offset, in bytes, in a stream. Read more
1.55.0 · Source§fn rewind(&mut self) -> Result<(), Error>
fn rewind(&mut self) -> Result<(), Error>
Rewind to the beginning of a stream. Read more
Source§fn stream_len(&mut self) -> Result<u64, Error>
fn stream_len(&mut self) -> Result<u64, Error>
🔬This is a nightly-only experimental API. (
seek_stream_len)Returns the length of this stream (in bytes). Read more
Auto Trait Implementations§
impl<R> Freeze for ExeReader<R>where
R: Freeze,
impl<R> !RefUnwindSafe for ExeReader<R>
impl<R> Send for ExeReader<R>where
R: Send,
impl<R> Sync for ExeReader<R>where
R: Sync,
impl<R> Unpin for ExeReader<R>where
R: Unpin,
impl<R> UnsafeUnpin for ExeReader<R>where
R: UnsafeUnpin,
impl<R> !UnwindSafe for ExeReader<R>
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