[][src]Trait nbd_async::BlockDevice

pub trait BlockDevice {
#[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
; #[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
, { ... }
#[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
, { ... }
#[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
, { ... } }

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]

Read a block from offset.

Loading content...

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]

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]

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]

Marks blocks as unused

Loading content...

Implementors

Loading content...