Trait MappableHandle

Source
pub trait MappableHandle {
    // Required methods
    fn read(&mut self, buffer: &mut [u8]) -> Result<()>;
    fn image_size(&mut self) -> usize;
}
Expand description

A trait for types that can be mapped into the client’s address space.

Required Methods§

Source

fn read(&mut self, buffer: &mut [u8]) -> Result<()>

Read the contents of self into buffer.

The size of buffer must be equal to image_size(), or an error will be returned.

Source

fn image_size(&mut self) -> usize

Returns the size of the buffer argument required to call read on this handle.

Implementations on Foreign Types§

Source§

impl<'a> MappableHandle for Image<'a>

Source§

fn read(&mut self, buffer: &mut [u8]) -> Result<()>

Source§

fn image_size(&mut self) -> usize

Implementors§