ExtendedResultStore

Trait ExtendedResultStore 

Source
pub trait ExtendedResultStore: ResultStore {
    // Required methods
    fn store_result_with_metadata<'life0, 'async_trait>(
        &'life0 self,
        task_id: TaskId,
        result: TaskResultValue,
        metadata: ResultMetadata,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_metadata<'life0, 'async_trait>(
        &'life0 self,
        task_id: TaskId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ResultMetadata>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn store_chunk<'life0, 'async_trait>(
        &'life0 self,
        task_id: TaskId,
        chunk: ResultChunk,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_chunk<'life0, 'async_trait>(
        &'life0 self,
        task_id: TaskId,
        index: usize,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ResultChunk>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_all_chunks<'life0, 'async_trait>(
        &'life0 self,
        task_id: TaskId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ResultChunk>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn store_tombstone<'life0, 'async_trait>(
        &'life0 self,
        tombstone: ResultTombstone,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_tombstone<'life0, 'async_trait>(
        &'life0 self,
        task_id: TaskId,
    ) -> Pin<Box<dyn Future<Output = Result<Option<ResultTombstone>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn cleanup_expired<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn query_by_tags<'life0, 'life1, 'async_trait>(
        &'life0 self,
        tags: &'life1 [String],
    ) -> Pin<Box<dyn Future<Output = Result<Vec<TaskId>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;

    // Provided method
    fn has_tombstone<'life0, 'async_trait>(
        &'life0 self,
        task_id: TaskId,
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Extended result store with advanced features

Required Methods§

Source

fn store_result_with_metadata<'life0, 'async_trait>( &'life0 self, task_id: TaskId, result: TaskResultValue, metadata: ResultMetadata, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Store result with metadata

Source

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

Get result metadata

Source

fn store_chunk<'life0, 'async_trait>( &'life0 self, task_id: TaskId, chunk: ResultChunk, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Store a result chunk

Source

fn get_chunk<'life0, 'async_trait>( &'life0 self, task_id: TaskId, index: usize, ) -> Pin<Box<dyn Future<Output = Result<Option<ResultChunk>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a result chunk

Source

fn get_all_chunks<'life0, 'async_trait>( &'life0 self, task_id: TaskId, ) -> Pin<Box<dyn Future<Output = Result<Vec<ResultChunk>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get all chunks for a task

Source

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

Store a tombstone

Source

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

Get a tombstone

Source

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

Cleanup expired results

Source

fn query_by_tags<'life0, 'life1, 'async_trait>( &'life0 self, tags: &'life1 [String], ) -> Pin<Box<dyn Future<Output = Result<Vec<TaskId>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Query results by tags

Provided Methods§

Source

fn has_tombstone<'life0, 'async_trait>( &'life0 self, task_id: TaskId, ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Check if a task has a tombstone

Implementors§