MemoryWriteExt

Trait MemoryWriteExt 

Source
pub trait MemoryWriteExt: MemoryWrite {
    // Provided methods
    fn try_write<T: Pod>(&self, address: u64, buffer: &T) -> Option<()> { ... }
    unsafe fn try_write_unchecked<T>(
        &self,
        address: u64,
        buffer: &T,
    ) -> Option<()> { ... }
    fn write<T: Pod>(&self, address: u64, buffer: &T) { ... }
}
Expand description

Extension trait for supplying generic util methods for MemoryWrite

Provided Methods§

Source

fn try_write<T: Pod>(&self, address: u64, buffer: &T) -> Option<()>

Returns None if the address is not valid

Source

unsafe fn try_write_unchecked<T>(&self, address: u64, buffer: &T) -> Option<()>

Writes any type T to the process without the restriction of Pod

Source

fn write<T: Pod>(&self, address: u64, buffer: &T)

Writes bytes to the process at the specified address with the value of type T. Panics if the address is not valid

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.

Implementors§