Skip to main content

UploadSessionStore

Trait UploadSessionStore 

Source
pub trait UploadSessionStore: Send + Sync {
    // Required methods
    fn create<'life0, 'async_trait>(
        &'life0 self,
        session: UploadSession,
    ) -> Pin<Box<dyn Future<Output = BlobResult<UploadSession>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get<'life0, 'life1, 'async_trait>(
        &'life0 self,
        upload_id: &'life1 UploadId,
    ) -> Pin<Box<dyn Future<Output = BlobResult<UploadSession>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn update<'life0, 'async_trait>(
        &'life0 self,
        session: UploadSession,
    ) -> Pin<Box<dyn Future<Output = BlobResult<UploadSession>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        upload_id: &'life1 UploadId,
    ) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn record_part<'life0, 'life1, 'async_trait>(
        &'life0 self,
        upload_id: &'life1 UploadId,
        part: PartReceipt,
    ) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn mark_completed<'life0, 'life1, 'async_trait>(
        &'life0 self,
        upload_id: &'life1 UploadId,
        completed_at: i64,
    ) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn mark_failed<'life0, 'life1, 'async_trait>(
        &'life0 self,
        upload_id: &'life1 UploadId,
        failed_at: i64,
        reason: String,
    ) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn mark_aborted<'life0, 'life1, 'async_trait>(
        &'life0 self,
        upload_id: &'life1 UploadId,
        aborted_at: i64,
    ) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Storage for upload session state

Required Methods§

Source

fn create<'life0, 'async_trait>( &'life0 self, session: UploadSession, ) -> Pin<Box<dyn Future<Output = BlobResult<UploadSession>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Create a new upload session

Source

fn get<'life0, 'life1, 'async_trait>( &'life0 self, upload_id: &'life1 UploadId, ) -> Pin<Box<dyn Future<Output = BlobResult<UploadSession>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get an upload session

Source

fn update<'life0, 'async_trait>( &'life0 self, session: UploadSession, ) -> Pin<Box<dyn Future<Output = BlobResult<UploadSession>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Update an upload session

Source

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

Delete an upload session

Source

fn record_part<'life0, 'life1, 'async_trait>( &'life0 self, upload_id: &'life1 UploadId, part: PartReceipt, ) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Record a part upload

Source

fn mark_completed<'life0, 'life1, 'async_trait>( &'life0 self, upload_id: &'life1 UploadId, completed_at: i64, ) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark session as completed

Source

fn mark_failed<'life0, 'life1, 'async_trait>( &'life0 self, upload_id: &'life1 UploadId, failed_at: i64, reason: String, ) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark session as failed

Source

fn mark_aborted<'life0, 'life1, 'async_trait>( &'life0 self, upload_id: &'life1 UploadId, aborted_at: i64, ) -> Pin<Box<dyn Future<Output = BlobResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark session as aborted

Implementors§