pub struct InMemoryAgentStorage { /* private fields */ }Expand description
In-memory implementation of AgentStorage.
All data is lost when the process exits.
Trait Implementations§
Source§impl AgentStorage for InMemoryAgentStorage
impl AgentStorage for InMemoryAgentStorage
Source§fn create_session<'life0, 'async_trait>(
&'life0 self,
event: SessionInitEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_session<'life0, 'async_trait>(
&'life0 self,
event: SessionInitEvent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Persist the initial event that starts a new session.
Source§fn update_session<'life0, 'async_trait>(
&'life0 self,
event: AgentEventAny,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_session<'life0, 'async_trait>(
&'life0 self,
event: AgentEventAny,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Append an event to an existing session.
Source§fn get_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentEventAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<AgentEventAny>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieve all events for a given session, ordered by time.
Source§impl Debug for InMemoryAgentStorage
impl Debug for InMemoryAgentStorage
Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryAgentStorage
impl !UnwindSafe for InMemoryAgentStorage
impl Freeze for InMemoryAgentStorage
impl Send for InMemoryAgentStorage
impl Sync for InMemoryAgentStorage
impl Unpin for InMemoryAgentStorage
impl UnsafeUnpin for InMemoryAgentStorage
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