[−][src]Trait nbd_async::BlockDevice
A block device.
Required methods
#[must_use]pub fn read<'life0, 'life1, 'async_trait>(
&'life0 mut self,
offset: u64,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
offset: u64,
buf: &'life1 mut [u8]
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Read a block from offset.
Provided methods
#[must_use]pub fn write<'life0, 'life1, 'async_trait>(
&'life0 mut self,
_offset: u64,
_buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_offset: u64,
_buf: &'life1 [u8]
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Write a block of data at offset.
#[must_use]pub fn flush<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Flushes write buffers to the underlying storage medium
#[must_use]pub fn trim<'life0, 'async_trait>(
&'life0 mut self,
_offset: u64,
_size: usize
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
[src]
&'life0 mut self,
_offset: u64,
_size: usize
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Marks blocks as unused