pub struct SessionRegistryConfig { /* private fields */ }Expand description
Finite, validated bounds for an opaque-session continuity registry.
Fields are deliberately private so callers cannot bypass validation.
ⓘ
use gaze_proxy::SessionRegistryConfig;
let _ = SessionRegistryConfig { max_active_sessions: 1 };Implementations§
Source§impl SessionRegistryConfig
impl SessionRegistryConfig
pub const HARD_MAX_ACTIVE_SESSIONS: usize = 65_536
pub const HARD_MAX_SESSION_TTL: Duration
pub const HARD_MAX_TOMBSTONES: usize = 65_536
pub const HARD_MAX_TOMBSTONE_BYTES: usize
pub const HARD_MAX_TOMBSTONE_TTL: Duration
Sourcepub fn try_new(
max_active_sessions: usize,
session_ttl: Duration,
max_tombstones: usize,
max_tombstone_bytes: usize,
tombstone_ttl: Duration,
) -> Result<Self, SessionRegistryConfigError>
pub fn try_new( max_active_sessions: usize, session_ttl: Duration, max_tombstones: usize, max_tombstone_bytes: usize, tombstone_ttl: Duration, ) -> Result<Self, SessionRegistryConfigError>
Constructs a registry configuration after validating every finite bound.
pub const fn max_active_sessions(&self) -> usize
pub const fn session_ttl(&self) -> Duration
pub const fn max_tombstones(&self) -> usize
pub const fn max_tombstone_bytes(&self) -> usize
pub const fn tombstone_ttl(&self) -> Duration
pub fn try_with_max_active_sessions( self, value: usize, ) -> Result<Self, SessionRegistryConfigError>
pub fn try_with_session_ttl( self, value: Duration, ) -> Result<Self, SessionRegistryConfigError>
pub fn try_with_max_tombstones( self, value: usize, ) -> Result<Self, SessionRegistryConfigError>
pub fn try_with_max_tombstone_bytes( self, value: usize, ) -> Result<Self, SessionRegistryConfigError>
pub fn try_with_tombstone_ttl( self, value: Duration, ) -> Result<Self, SessionRegistryConfigError>
Trait Implementations§
Source§impl Clone for SessionRegistryConfig
impl Clone for SessionRegistryConfig
impl Copy for SessionRegistryConfig
Source§impl Debug for SessionRegistryConfig
impl Debug for SessionRegistryConfig
Source§impl Default for SessionRegistryConfig
impl Default for SessionRegistryConfig
impl Eq for SessionRegistryConfig
Source§impl PartialEq for SessionRegistryConfig
impl PartialEq for SessionRegistryConfig
impl StructuralPartialEq for SessionRegistryConfig
Auto Trait Implementations§
impl Freeze for SessionRegistryConfig
impl RefUnwindSafe for SessionRegistryConfig
impl Send for SessionRegistryConfig
impl Sync for SessionRegistryConfig
impl Unpin for SessionRegistryConfig
impl UnsafeUnpin for SessionRegistryConfig
impl UnwindSafe for SessionRegistryConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more