pub trait ThreadStore: Send + Sync {
Show 18 methods
// Required methods
fn as_any(&self) -> &dyn Any;
fn create_thread<'life0, 'async_trait>(
&'life0 self,
request: CreateThreadRequest,
) -> Pin<Box<dyn Future<Output = Result<Thread>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Thread>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
request: UpdateThreadRequest,
) -> Pin<Box<dyn Future<Output = Result<Thread>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_threads<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 ThreadListFilter,
limit: Option<u32>,
offset: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<ThreadListResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_thread_with_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_home_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HomeStats>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_agents_by_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
search: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentUsageInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_agent_stats_map<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, AgentStatsInfo>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn mark_message_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MessageReadStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_message_read_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MessageReadStatus>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_thread_read_status<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageReadStatus>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn vote_message<'life0, 'async_trait>(
&'life0 self,
request: VoteMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<MessageVote>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove_vote<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_user_vote<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MessageVote>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_message_vote_summary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MessageVoteSummary>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_message_votes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageVote>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
fn as_any(&self) -> &dyn Any
fn create_thread<'life0, 'async_trait>(
&'life0 self,
request: CreateThreadRequest,
) -> Pin<Box<dyn Future<Output = Result<Thread>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Thread>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
request: UpdateThreadRequest,
) -> Pin<Box<dyn Future<Output = Result<Thread>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_thread<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn list_threads<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 ThreadListFilter,
limit: Option<u32>,
offset: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<ThreadListResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_threads<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 ThreadListFilter,
limit: Option<u32>,
offset: Option<u32>,
) -> Pin<Box<dyn Future<Output = Result<ThreadListResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
List threads with pagination and filtering Returns a paginated response with total count
fn update_thread_with_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn get_home_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HomeStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_home_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HomeStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get aggregated home statistics
Sourcefn get_agents_by_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
search: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentUsageInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_agents_by_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
search: Option<&'life1 str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentUsageInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get agents sorted by thread count (most active first) Includes all registered agents (even those with 0 threads). Optionally filters by name using a search string.
Sourcefn get_agent_stats_map<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, AgentStatsInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_agent_stats_map<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, AgentStatsInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get a map of agent name -> stats for all agents with activity
Sourcefn mark_message_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MessageReadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn mark_message_read<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MessageReadStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Mark a message as read by the current user
Sourcefn get_message_read_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MessageReadStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_message_read_status<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MessageReadStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get read status for a specific message
Sourcefn get_thread_read_status<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageReadStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_thread_read_status<'life0, 'life1, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageReadStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get read status for all messages in a thread for the current user
Sourcefn vote_message<'life0, 'async_trait>(
&'life0 self,
request: VoteMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<MessageVote>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn vote_message<'life0, 'async_trait>(
&'life0 self,
request: VoteMessageRequest,
) -> Pin<Box<dyn Future<Output = Result<MessageVote>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Vote on a message (upvote or downvote) For downvotes, a comment is required
Sourcefn remove_vote<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove_vote<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a vote from a message
Sourcefn get_user_vote<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MessageVote>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_user_vote<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<MessageVote>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get the current user’s vote on a message
Sourcefn get_message_vote_summary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MessageVoteSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_message_vote_summary<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<MessageVoteSummary>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get vote summary for a message (counts + current user’s vote)
Sourcefn get_message_votes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageVote>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_message_votes<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
thread_id: &'life1 str,
message_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<MessageVote>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get all votes for a message (admin/analytics use)