pub struct SessionManagerConfig {
pub storage: Option<Arc<dyn Storage>>,
pub session_id: Option<String>,
pub save_latest_on: Option<SaveLatestStrategy>,
pub snapshot_trigger: Option<SnapshotTriggerCallback>,
}Expand description
Configuration for a SessionManager (SessionManagerConfig).
Fields§
§storage: Option<Arc<dyn Storage>>Storage for the snapshots. A storage that is not namespaced is scoped under session.
Unset, the session manager uses the agent’s
storage when it attaches; without either it fails. The
builder’s storage(..) takes a storage by value or as an Arc.
session_id: Option<String>The session id; ^[a-z0-9_-]+$. Defaults to default-session.
save_latest_on: Option<SaveLatestStrategy>When to save snapshot_latest. Defaults to SaveLatestStrategy::Invocation.
snapshot_trigger: Option<SnapshotTriggerCallback>Decides after each invocation whether to also save an immutable snapshot. The builder
takes a SnapshotTriggerCallback or a closure with annotated arguments.
Trait Implementations§
Source§impl Debug for SessionManagerConfig
impl Debug for SessionManagerConfig
Auto Trait Implementations§
impl !RefUnwindSafe for SessionManagerConfig
impl !UnwindSafe for SessionManagerConfig
impl Freeze for SessionManagerConfig
impl Send for SessionManagerConfig
impl Sync for SessionManagerConfig
impl Unpin for SessionManagerConfig
impl UnsafeUnpin for SessionManagerConfig
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
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreCreates a shared type from an unshared type.