pub struct InMemorySessionManager { /* private fields */ }Expand description
In-memory session manager. All data is lost when the process exits.
Implementations§
Trait Implementations§
Source§impl Debug for InMemorySessionManager
impl Debug for InMemorySessionManager
Source§impl Default for InMemorySessionManager
impl Default for InMemorySessionManager
Source§fn default() -> InMemorySessionManager
fn default() -> InMemorySessionManager
Returns the “default value” for a type. Read more
Source§impl SessionManager for InMemorySessionManager
impl SessionManager for InMemorySessionManager
Source§fn list(&self) -> BoxFuture<'_, Result<Vec<SessionMetadata>, AgentError>>
fn list(&self) -> BoxFuture<'_, Result<Vec<SessionMetadata>, AgentError>>
List all sessions, ordered by most-recently updated first.
Source§fn resume(&self, session_id: &str) -> BoxFuture<'_, Result<Session, AgentError>>
fn resume(&self, session_id: &str) -> BoxFuture<'_, Result<Session, AgentError>>
Load a session by ID.
Source§fn save(&self, session: &Session) -> BoxFuture<'_, Result<(), AgentError>>
fn save(&self, session: &Session) -> BoxFuture<'_, Result<(), AgentError>>
Save (create or update) a session.
Source§fn delete(&self, session_id: &str) -> BoxFuture<'_, Result<(), AgentError>>
fn delete(&self, session_id: &str) -> BoxFuture<'_, Result<(), AgentError>>
Delete a session and all associated data.
Source§fn fork(
&self,
session_id: &str,
new_name: Option<String>,
) -> BoxFuture<'_, Result<SessionMetadata, AgentError>>
fn fork( &self, session_id: &str, new_name: Option<String>, ) -> BoxFuture<'_, Result<SessionMetadata, AgentError>>
Fork a session — create a copy with a new ID. Read more
Source§fn rewind(
&self,
session_id: &str,
turn_index: u32,
) -> BoxFuture<'_, Result<Session, AgentError>>
fn rewind( &self, session_id: &str, turn_index: u32, ) -> BoxFuture<'_, Result<Session, AgentError>>
Rewind a session to a previous turn. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for InMemorySessionManager
impl !UnwindSafe for InMemorySessionManager
impl Freeze for InMemorySessionManager
impl Send for InMemorySessionManager
impl Sync for InMemorySessionManager
impl Unpin for InMemorySessionManager
impl UnsafeUnpin for InMemorySessionManager
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