pub struct SqliteSessionStore { /* private fields */ }Expand description
SQLite-backed SessionStore.
Implementations§
Trait Implementations§
Source§impl Clone for SqliteSessionStore
impl Clone for SqliteSessionStore
Source§fn clone(&self) -> SqliteSessionStore
fn clone(&self) -> SqliteSessionStore
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl SessionStore for SqliteSessionStore
impl SessionStore for SqliteSessionStore
Source§fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
messages: Vec<Message>,
) -> Pin<Box<dyn Future<Output = Result<SessionRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
messages: Vec<Message>,
) -> Pin<Box<dyn Future<Output = Result<SessionRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create a new session row and return the hydrated record.
Source§fn fork<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
parent: SessionId,
messages: Vec<Message>,
turns: u32,
) -> Pin<Box<dyn Future<Output = Result<SessionRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fork<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
parent: SessionId,
messages: Vec<Message>,
turns: u32,
) -> Pin<Box<dyn Future<Output = Result<SessionRecord>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fork an existing session: create a child row carrying a copy of
messages with parent_id set to parent and a turns
carried over from the parent (Phase Z).Source§fn update<'life0, 'async_trait>(
&'life0 self,
id: SessionId,
messages: Vec<Message>,
turns: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 self,
id: SessionId,
messages: Vec<Message>,
turns: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Replace the messages of an existing session and bump
turns + updated_at.Source§fn rename<'life0, 'life1, 'async_trait>(
&'life0 self,
id: SessionId,
title: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn rename<'life0, 'life1, 'async_trait>(
&'life0 self,
id: SessionId,
title: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Set an explicit, user-chosen title for a session, overriding the
auto-derived one (Phase RR —
/rename). Leaves messages/turns
untouched.Source§fn list_by_project<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_by_project<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Most recent sessions for
project first.Source§fn get<'life0, 'async_trait>(
&'life0 self,
id: SessionId,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
id: SessionId,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch by id.
Source§fn delete<'life0, 'async_trait>(
&'life0 self,
id: SessionId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
id: SessionId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Remove a session.
Source§fn latest<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn latest<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<SessionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Most recent session for
project, if any.Source§fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchHit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<SearchHit>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Substring search across every session’s message bodies and
titles. Case-insensitive. Most recently updated hits first
(Phase L).
Source§fn find_by_id_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn find_by_id_prefix<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<SessionRecord>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Resolve a UUID prefix to the matching
SessionRecord(s). Empty
vec when no match, multi-element when the prefix is ambiguous.
Used by /load (Phase L).Auto Trait Implementations§
impl Freeze for SqliteSessionStore
impl RefUnwindSafe for SqliteSessionStore
impl Send for SqliteSessionStore
impl Sync for SqliteSessionStore
impl Unpin for SqliteSessionStore
impl UnsafeUnpin for SqliteSessionStore
impl UnwindSafe for SqliteSessionStore
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more