guestmem

Trait MemoryWrite

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

    // Provided methods
    fn zero(&mut self, len: usize) -> Result<(), AccessError> { ... }
    fn limit(self, len: usize) -> Limit<Self>
       where Self: Sized { ... }
}

Required Methods§

Source

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

Source

fn fill(&mut self, val: u8, len: usize) -> Result<(), AccessError>

Source

fn len(&self) -> usize

Provided Methods§

Source

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

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 fill(&mut self, val: u8, len: usize) -> Result<(), AccessError>

Source§

fn len(&self) -> usize

Implementors§