pub trait BlockDevice {
// Required method
fn read<'life0, 'life1, 'async_trait>(
&'life0 mut self,
offset: u64,
buf: &'life1 mut [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided methods
fn write<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_offset: u64,
_buf: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn flush<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn trim<'life0, 'async_trait>(
&'life0 mut self,
_offset: u64,
_size: usize,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}
Expand description
A block device.
Required Methods§
Provided Methods§
Sourcefn write<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_offset: u64,
_buf: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_offset: u64,
_buf: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Write a block of data at offset.