Skip to main content

MemoryBackend

Trait MemoryBackend 

Source
pub trait MemoryBackend: Send + Sync {
    // Required methods
    fn list_processes(&self) -> Result<Vec<ProcessInfo>>;
    fn process_by_pid(&self, pid: Pid) -> Result<ProcessInfo>;
    fn process_by_name(&self, name: &str) -> Result<ProcessInfo>;
    fn module_list(&self, pid: Pid) -> Result<Vec<ModuleInfo>>;
    fn module_by_name(&self, pid: Pid, name: &str) -> Result<ModuleInfo>;
    fn module_exports(
        &self,
        pid: Pid,
        module: &str,
    ) -> Result<Vec<(String, u64)>>;
    fn read(&self, pid: Pid, addr: u64, len: usize) -> Result<Vec<u8>>;
    fn write(&self, pid: Pid, addr: u64, data: &[u8]) -> Result<usize>;
    fn memory_map(&self, pid: Pid) -> Result<Vec<MemRegion>>;
}

Required Methods§

Source

fn list_processes(&self) -> Result<Vec<ProcessInfo>>

Source

fn process_by_pid(&self, pid: Pid) -> Result<ProcessInfo>

Source

fn process_by_name(&self, name: &str) -> Result<ProcessInfo>

Source

fn module_list(&self, pid: Pid) -> Result<Vec<ModuleInfo>>

Source

fn module_by_name(&self, pid: Pid, name: &str) -> Result<ModuleInfo>

Source

fn module_exports(&self, pid: Pid, module: &str) -> Result<Vec<(String, u64)>>

Source

fn read(&self, pid: Pid, addr: u64, len: usize) -> Result<Vec<u8>>

Source

fn write(&self, pid: Pid, addr: u64, data: &[u8]) -> Result<usize>

Source

fn memory_map(&self, pid: Pid) -> Result<Vec<MemRegion>>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§