ThreadWriter

Trait ThreadWriter 

Source
pub trait ThreadWriter: ThreadReader {
    // Required methods
    fn create<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thread: &'life1 Thread,
    ) -> Pin<Box<dyn Future<Output = Result<Committed, ThreadStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn append<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        thread_id: &'life1 str,
        delta: &'life2 ThreadChangeSet,
        precondition: VersionPrecondition,
    ) -> Pin<Box<dyn Future<Output = Result<Committed, ThreadStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn delete<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thread_id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), ThreadStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn save<'life0, 'life1, 'async_trait>(
        &'life0 self,
        thread: &'life1 Thread,
    ) -> Pin<Box<dyn Future<Output = Result<(), ThreadStoreError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn create<'life0, 'life1, 'async_trait>( &'life0 self, thread: &'life1 Thread, ) -> Pin<Box<dyn Future<Output = Result<Committed, ThreadStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Create a new Thread.

Source

fn append<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, thread_id: &'life1 str, delta: &'life2 ThreadChangeSet, precondition: VersionPrecondition, ) -> Pin<Box<dyn Future<Output = Result<Committed, ThreadStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Append an ThreadChangeSet to an existing Thread.

Source

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

Delete an Thread.

Source

fn save<'life0, 'life1, 'async_trait>( &'life0 self, thread: &'life1 Thread, ) -> Pin<Box<dyn Future<Output = Result<(), ThreadStoreError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Upsert or replace the current persisted Thread.

Implementations must provide atomic semantics suitable for their backend.

Implementors§