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§
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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 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.
Sourcefn 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,
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.