Skip to main content

ThreadStore

Trait ThreadStore 

Source
pub trait ThreadStore: Send + Sync {
Show 13 methods // Required methods fn id(&self) -> String; fn create_thread<'life0, 'async_trait>( &'life0 self, metadata: ThreadMetadata, ) -> Pin<Box<dyn Future<Output = Result<ThreadMetadata, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn list_threads<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<ThreadMetadata>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn load_thread<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 String, ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadSnapshot>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn append_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, thread_id: &'life1 String, envelope: &'life2 EventEnvelope, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; // Provided methods fn local_thread_root(&self) -> Option<PathBuf> { ... } fn context_artifact_store(&self) -> Option<ContextArtifactStore> { ... } fn update_thread_metadata<'life0, 'async_trait>( &'life0 self, metadata: ThreadMetadata, ) -> Pin<Box<dyn Future<Output = Result<ThreadMetadata, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait { ... } fn list_threads_page<'life0, 'async_trait>( &'life0 self, options: ThreadListOptions, ) -> Pin<Box<dyn Future<Output = Result<ThreadListPage, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait { ... } fn load_thread_metadata<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 String, ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadMetadata>, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn archive_thread<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 String, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn append_item_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, thread_id: &'life1 String, item_event: &'life2 ThreadItemEvent, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait { ... } fn append_extension_state<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, thread_id: &'life1 String, record: &'life2 ExtensionStateRecord, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait { ... }
}

Required Methods§

Source

fn id(&self) -> String

Source

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

Source

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

Source

fn load_thread<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 String, ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadSnapshot>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn append_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, thread_id: &'life1 String, envelope: &'life2 EventEnvelope, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Provided Methods§

Source

fn local_thread_root(&self) -> Option<PathBuf>

Source

fn context_artifact_store(&self) -> Option<ContextArtifactStore>

Source

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

Source

fn list_threads_page<'life0, 'async_trait>( &'life0 self, options: ThreadListOptions, ) -> Pin<Box<dyn Future<Output = Result<ThreadListPage, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

fn load_thread_metadata<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 String, ) -> Pin<Box<dyn Future<Output = Result<Option<ThreadMetadata>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn archive_thread<'life0, 'life1, 'async_trait>( &'life0 self, thread_id: &'life1 String, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Source

fn append_item_event<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, thread_id: &'life1 String, item_event: &'life2 ThreadItemEvent, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Source

fn append_extension_state<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, thread_id: &'life1 String, record: &'life2 ExtensionStateRecord, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§