Trait Module
pub trait Module {
// Provided methods
fn name(&self) -> String { ... }
fn path(&self) -> String { ... }
fn imagebase(&self) -> u64 { ... }
fn size(&self) -> u64 { ... }
fn end(&self) -> u64 { ... }
fn contains(&self, addr: u64) -> bool { ... }
fn dump(&self) -> Vec<u8> { ... }
fn dump_to_file<P: AsRef<Path>>(&self, path: P) -> Vec<u8> { ... }
}Expand description
This trait is shared by all system-specific modules. It provides a common interface for accessing module metadata.
Provided Methods§
fn dump(&self) -> Vec<u8>
fn dump(&self) -> Vec<u8>
Return the content of the module as it is currently mapped in memory.
The returned buffer spans Module::imagebase over Module::size
bytes. An empty buffer is returned if the imagebase or the size is null.
fn dump_to_file<P: AsRef<Path>>(&self, path: P) -> Vec<u8>
fn dump_to_file<P: AsRef<Path>>(&self, path: P) -> Vec<u8>
Same as Module::dump but also write the content into the file
located at path.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.