Trait guestmem::MemoryWrite

source ·
pub trait MemoryWrite {
    // Required methods
    fn write(&mut self, data: &[u8]) -> Result<(), AccessError>;
    fn zero(&mut self, len: usize) -> Result<(), AccessError>;
    fn len(&self) -> usize;

    // Provided method
    fn limit(self, len: usize) -> Limit<Self>
       where Self: Sized { ... }
}

Required Methods§

source

fn write(&mut self, data: &[u8]) -> Result<(), AccessError>

source

fn zero(&mut self, len: usize) -> Result<(), AccessError>

source

fn len(&self) -> usize

Provided Methods§

source

fn limit(self, len: usize) -> Limit<Self>
where Self: Sized,

Implementations on Foreign Types§

source§

impl MemoryWrite for &mut [u8]

source§

fn write(&mut self, data: &[u8]) -> Result<(), AccessError>

source§

fn zero(&mut self, len: usize) -> Result<(), AccessError>

source§

fn len(&self) -> usize

Implementors§