Trait Repository

Source
pub trait Repository {
    // Required methods
    fn save<'life0, 'async_trait>(
        &'life0 self,
        id: String,
        stream: Box<dyn Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'static>,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn write<'life0, 'async_trait>(
        &'life0 self,
        id: String,
        range: (Bound<u64>, Bound<u64>),
        body: Bytes,
    ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        blob_id: &'life1 str,
        range: Option<(Bound<u64>, Bound<u64>)>,
    ) -> Pin<Box<dyn Future<Output = Result<ChunkedStreamInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        blob_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn fsync<'life0, 'async_trait>(
        &'life0 self,
        id: String,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn available_space<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn save<'life0, 'async_trait>( &'life0 self, id: String, stream: Box<dyn Stream<Item = Result<Bytes, Error>> + Send + Sync + Unpin + 'static>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn write<'life0, 'async_trait>( &'life0 self, id: String, range: (Bound<u64>, Bound<u64>), body: Bytes, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, blob_id: &'life1 str, range: Option<(Bound<u64>, Bound<u64>)>, ) -> Pin<Box<dyn Future<Output = Result<ChunkedStreamInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, blob_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn fsync<'life0, 'async_trait>( &'life0 self, id: String, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn available_space<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<u64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§