pub struct SessionManagerBuilder<S: State = Empty> { /* private fields */ }Expand description
Builds a SessionManager; the setters are the SessionManagerConfig keys.
Implementations§
Source§impl<S: State> SessionManagerBuilder<S>
impl<S: State> SessionManagerBuilder<S>
Sourcepub fn storage(
self,
storage: impl IntoStorage,
) -> SessionManagerBuilder<SetStorage<S>>where
S::Storage: IsUnset,
pub fn storage(
self,
storage: impl IntoStorage,
) -> SessionManagerBuilder<SetStorage<S>>where
S::Storage: IsUnset,
Sourcepub fn maybe_storage(
self,
value: Option<impl IntoStorage>,
) -> SessionManagerBuilder<SetStorage<S>>where
S::Storage: IsUnset,
pub fn maybe_storage(
self,
value: Option<impl IntoStorage>,
) -> SessionManagerBuilder<SetStorage<S>>where
S::Storage: IsUnset,
Sourcepub fn session_id(
self,
value: impl Into<String>,
) -> SessionManagerBuilder<SetSessionId<S>>where
S::SessionId: IsUnset,
pub fn session_id(
self,
value: impl Into<String>,
) -> SessionManagerBuilder<SetSessionId<S>>where
S::SessionId: IsUnset,
Sourcepub fn maybe_session_id(
self,
value: Option<impl Into<String>>,
) -> SessionManagerBuilder<SetSessionId<S>>where
S::SessionId: IsUnset,
pub fn maybe_session_id(
self,
value: Option<impl Into<String>>,
) -> SessionManagerBuilder<SetSessionId<S>>where
S::SessionId: IsUnset,
Sourcepub fn save_latest_on(
self,
value: SaveLatestStrategy,
) -> SessionManagerBuilder<SetSaveLatestOn<S>>where
S::SaveLatestOn: IsUnset,
pub fn save_latest_on(
self,
value: SaveLatestStrategy,
) -> SessionManagerBuilder<SetSaveLatestOn<S>>where
S::SaveLatestOn: IsUnset,
Optional (Some / Option setters).
When to save snapshot_latest. Defaults to SaveLatestStrategy::Invocation.
Sourcepub fn maybe_save_latest_on(
self,
value: Option<SaveLatestStrategy>,
) -> SessionManagerBuilder<SetSaveLatestOn<S>>where
S::SaveLatestOn: IsUnset,
pub fn maybe_save_latest_on(
self,
value: Option<SaveLatestStrategy>,
) -> SessionManagerBuilder<SetSaveLatestOn<S>>where
S::SaveLatestOn: IsUnset,
Optional (Some / Option setters).
When to save snapshot_latest. Defaults to SaveLatestStrategy::Invocation.
Sourcepub fn snapshot_trigger(
self,
value: impl Into<SnapshotTriggerCallback>,
) -> SessionManagerBuilder<SetSnapshotTrigger<S>>where
S::SnapshotTrigger: IsUnset,
pub fn snapshot_trigger(
self,
value: impl Into<SnapshotTriggerCallback>,
) -> SessionManagerBuilder<SetSnapshotTrigger<S>>where
S::SnapshotTrigger: IsUnset,
Optional (Some / Option setters).
Decides after each invocation whether to also save an immutable snapshot. The builder
takes a SnapshotTriggerCallback or a closure with annotated arguments.
Sourcepub fn maybe_snapshot_trigger(
self,
value: Option<impl Into<SnapshotTriggerCallback>>,
) -> SessionManagerBuilder<SetSnapshotTrigger<S>>where
S::SnapshotTrigger: IsUnset,
pub fn maybe_snapshot_trigger(
self,
value: Option<impl Into<SnapshotTriggerCallback>>,
) -> SessionManagerBuilder<SetSnapshotTrigger<S>>where
S::SnapshotTrigger: IsUnset,
Optional (Some / Option setters).
Decides after each invocation whether to also save an immutable snapshot. The builder
takes a SnapshotTriggerCallback or a closure with annotated arguments.
Source§impl<S: IsComplete> SessionManagerBuilder<S>
impl<S: IsComplete> SessionManagerBuilder<S>
Sourcepub fn build(self) -> Result<SessionManager>
pub fn build(self) -> Result<SessionManager>
Auto Trait Implementations§
impl<S = Empty> !RefUnwindSafe for SessionManagerBuilder<S>
impl<S = Empty> !UnwindSafe for SessionManagerBuilder<S>
impl<S> Freeze for SessionManagerBuilder<S>
impl<S> Send for SessionManagerBuilder<S>
impl<S> Sync for SessionManagerBuilder<S>
impl<S> Unpin for SessionManagerBuilder<S>
impl<S> UnsafeUnpin for SessionManagerBuilder<S>
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.