pub trait HandleMiss {
    // Required methods
    fn write_body<'life0, 'async_trait>(
        &'life0 mut self,
        data: Bytes,
        eof: bool
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn finish<'async_trait>(
        self: Box<Self>
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

Cache miss handling trait

Required Methods§

source

fn write_body<'life0, 'async_trait>( &'life0 mut self, data: Bytes, eof: bool ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Write the given body to the storage

source

fn finish<'async_trait>( self: Box<Self> ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,

Finish the cache admission

When self is dropped without calling this function, the storage should consider this write failed.

Implementors§