[][src]Struct vmread::RWList

pub struct RWList<'a> { /* fields omitted */ }

A list of memory operations to be executed on its destruction

This provides a more efficient way of performing RW operations when the data is not needed immediately. The operations get cached and executed when the object goes out of scope.

Methods

impl<'a> RWList<'a>[src]

pub fn new(ctx: &'a WinCtx, dir_base: u64) -> RWList<'a>[src]

Create a new RWList instance

Arguments

  • ctx - vmread C context
  • dir_base - virtual address translation entry point. 0 for physical address mode

pub fn write<T>(&mut self, address: u64, val: &'a T) -> &mut Self[src]

Queue a write operation

Arguments

  • address - address to write the data to
  • val - reference to the value to be written

pub fn write_arr<T>(&mut self, address: u64, val: &'a [T]) -> &mut Self[src]

Queue an array write operation

Arguments

  • address - address to write the data to
  • val - reference to the slice to be written

pub fn read<T>(&mut self, address: u64, val: &'a mut T) -> &mut Self[src]

Queue a read operation

Arguments

  • address - address to read the data from
  • val - reference to the value to read the data into

pub fn read_arr<T>(&mut self, address: u64, val: &'a mut [T]) -> &mut Self[src]

Queue an array read operation

Arguments

  • address - address to read the data from
  • val - reference to the slice to read the data into

pub fn commit(
    &mut self,
    read_start: usize,
    write_start: usize
) -> (&mut Self, usize, usize)
[src]

Perform all cached memory operations

Both read and write lists get iterated from the starting points and vmread C library gets invoked. The lists then get truncated to the size of given starting points. The lists work like a stack, with the latest elements having priority over the older elements.

Arguments

  • read_start - starting index for read operations
  • write_start - starting index for write operations

pub fn commit_rw(&mut self) -> (&mut Self, usize, usize)[src]

Commit all RW operations in the list

pub fn commit_read(&mut self) -> (&mut Self, usize, usize)[src]

Commit only read operations in the list

pub fn commit_write(&mut self) -> (&mut Self, usize, usize)[src]

Commit only write operations in the list

Trait Implementations

impl<'_> Drop for RWList<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for RWList<'a>

impl<'a> !Send for RWList<'a>

impl<'a> !Sync for RWList<'a>

impl<'a> Unpin for RWList<'a>

impl<'a> UnwindSafe for RWList<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.