[−][src]Struct vmread::RWList
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 contextdir_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 toval
- 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 toval
- 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 fromval
- 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 fromval
- 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]
&mut self,
read_start: usize,
write_start: usize
) -> (&mut Self, usize, usize)
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 operationswrite_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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,