pub struct InMemorySessionStore { /* private fields */ }Expand description
A process-local SessionStore. Transcripts vanish on restart and are
not shared between replicas.
Implementations§
Trait Implementations§
Source§impl Debug for InMemorySessionStore
impl Debug for InMemorySessionStore
Source§impl Default for InMemorySessionStore
impl Default for InMemorySessionStore
Source§impl SessionStore for InMemorySessionStore
impl SessionStore for InMemorySessionStore
Source§fn load<'a>(
&'a self,
id: &'a SessionId,
) -> BoxFuture<'a, Result<Vec<ChatMessage>, AgentError>>
fn load<'a>( &'a self, id: &'a SessionId, ) -> BoxFuture<'a, Result<Vec<ChatMessage>, AgentError>>
Load a transcript. An unknown session is an empty transcript.
Source§fn save<'a>(
&'a self,
id: &'a SessionId,
messages: &'a [ChatMessage],
) -> BoxFuture<'a, Result<(), AgentError>>
fn save<'a>( &'a self, id: &'a SessionId, messages: &'a [ChatMessage], ) -> BoxFuture<'a, Result<(), AgentError>>
Replace a transcript.
Auto Trait Implementations§
impl !Freeze for InMemorySessionStore
impl Forget for InMemorySessionStore
impl RefUnwindSafe for InMemorySessionStore
impl Send for InMemorySessionStore
impl Sync for InMemorySessionStore
impl Unpin for InMemorySessionStore
impl UnsafeUnpin for InMemorySessionStore
impl UnwindSafe for InMemorySessionStore
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Scoped for T
impl<T> Scoped for T
Source§fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
fn scope(ctx: &PolicyContext) -> ScopeQuery<'_, Self>
Open a deferred
ScopeQuery for this type. Resolves the
registered scope at .load() time, not here.