pub trait BlockDevice {
    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
; 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
, { ... } fn flush<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } 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
, { ... } }
Expand description

A block device.

Required Methods

Read a block from offset.

Provided Methods

Write a block of data at offset.

Flushes write buffers to the underlying storage medium

Marks blocks as unused

Implementors