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§
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,
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.