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