Trait sel4_async_block_io::ByteIO

source ·
pub trait ByteIO<A: Access>: ByteIOLayout {
    // Required method
    async fn read_or_write(
        &self,
        offset: u64,
        operation: Operation<'_, A>,
    ) -> Result<(), Self::Error>;

    // Provided methods
    async fn read(&self, offset: u64, buf: &mut [u8]) -> Result<(), Self::Error>
       where A: ReadAccess { ... }
    async fn write(&self, offset: u64, buf: &[u8]) -> Result<(), Self::Error>
       where A: WriteAccess { ... }
}

Required Methods§

source

async fn read_or_write( &self, offset: u64, operation: Operation<'_, A>, ) -> Result<(), Self::Error>

Provided Methods§

source

async fn read(&self, offset: u64, buf: &mut [u8]) -> Result<(), Self::Error>
where A: ReadAccess,

source

async fn write(&self, offset: u64, buf: &[u8]) -> Result<(), Self::Error>
where A: WriteAccess,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: AsRef<[u8]> + AsMut<[u8]>> ByteIO<ReadWrite> for RefCell<SliceByteIO<T>>

source§

async fn read_or_write( &self, offset: u64, operation: Operation<'_, ReadWrite>, ) -> Result<(), Self::Error>

Implementors§

source§

impl<T: BlockIO<A>, A: ReadAccess> ByteIO<A> for ByteIOAdapter<T>

source§

impl<T: AsRef<[u8]>> ByteIO<ReadOnly> for SliceByteIO<T>