sel4_async_block_io

Trait BlockIO

Source
pub trait BlockIO<A: Access>: BlockIOLayout {
    // Required method
    async fn read_or_write_blocks(
        &self,
        start_block_idx: u64,
        operation: Operation<'_, A>,
    ) -> Result<(), Self::Error>;

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

Required Methods§

Source

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

Provided Methods§

Source

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

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: BlockIO<A>, A: Access> BlockIO<A> for &T

Source§

async fn read_or_write_blocks( &self, start_block_idx: u64, operation: Operation<'_, A>, ) -> Result<(), <&T as BlockIOLayout>::Error>

Source§

impl<T: BlockIO<A>, A: Access> BlockIO<A> for Rc<T>

Source§

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

Implementors§

Source§

impl<T: BlockIO<A>, A: Access> BlockIO<A> for CachedBlockIO<T>

Source§

impl<T: BlockIO<A>, A: Access> BlockIO<A> for Partition<T>

Source§

impl<T: BlockIO<A, BlockSize: HasNextBlockSize>, A: Access> BlockIO<A> for NextBlockSizeAdapter<T>

Source§

impl<T: BlockIO<A, BlockSize: HasPrevBlockSize>, A: ReadAccess> BlockIO<A> for PrevBlockSizeAdapter<T>

Source§

impl<T: ByteIO<A>, A: Access, N: BlockSize + Copy> BlockIO<A> for BlockIOAdapter<T, N>