pub struct InMemorySessionStorageStore { /* private fields */ }Expand description
In-memory implementation of session key/value and secret storage.
Implementations§
Source§impl InMemorySessionStorageStore
impl InMemorySessionStorageStore
Sourcepub fn new() -> InMemorySessionStorageStore
pub fn new() -> InMemorySessionStorageStore
Create an empty in-memory storage store.
Trait Implementations§
Source§impl Clone for InMemorySessionStorageStore
impl Clone for InMemorySessionStorageStore
Source§fn clone(&self) -> InMemorySessionStorageStore
fn clone(&self) -> InMemorySessionStorageStore
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 Debug for InMemorySessionStorageStore
impl Debug for InMemorySessionStorageStore
Source§impl Default for InMemorySessionStorageStore
impl Default for InMemorySessionStorageStore
Source§fn default() -> InMemorySessionStorageStore
fn default() -> InMemorySessionStorageStore
Returns the “default value” for a type. Read more
Source§impl SessionStorageStore for InMemorySessionStorageStore
impl SessionStorageStore for InMemorySessionStorageStore
Source§fn set_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
key: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
fn set_value<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
key: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
Set a key/value pair (creates or updates)
Source§fn get_value<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
fn get_value<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
Get a value by key
Source§fn delete_value<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
fn delete_value<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
Delete a key/value pair
Source§fn list_keys<'life0, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
) -> Pin<Box<dyn Future<Output = Result<Vec<KeyInfo>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
fn list_keys<'life0, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
) -> Pin<Box<dyn Future<Output = Result<Vec<KeyInfo>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
List all keys in a session
Source§fn set_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
name: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
fn set_secret<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
name: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
Set a secret (creates or updates, value is encrypted before storage)
Source§fn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
fn get_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<String>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
Get a secret by name (value is decrypted before returning)
Source§fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
fn delete_secret<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
Delete a secret
Source§fn list_secrets<'life0, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SecretInfo>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
fn list_secrets<'life0, 'async_trait>(
&'life0 self,
session_id: TypedId<SessionIdMarker>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SecretInfo>, AgentLoopError>> + Send + 'async_trait>>where
'life0: 'async_trait,
InMemorySessionStorageStore: 'async_trait,
List all secret names in a session (without values)
Auto Trait Implementations§
impl !RefUnwindSafe for InMemorySessionStorageStore
impl !UnwindSafe for InMemorySessionStorageStore
impl Freeze for InMemorySessionStorageStore
impl Send for InMemorySessionStorageStore
impl Sync for InMemorySessionStorageStore
impl Unpin for InMemorySessionStorageStore
impl UnsafeUnpin for InMemorySessionStorageStore
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request