pub struct InMemoryTokenStore { /* private fields */ }Expand description
Simple in-memory TokenStore backed by a HashMap under a std::sync::RwLock.
Designed for short-lived session data that does not need to survive process restarts. All sessions are lost when the process exits.
Uses std::sync::RwLock (not tokio::sync::RwLock) because the
TokenStore trait methods are synchronous and in-memory operations
are fast enough to not block async tasks meaningfully.
Note: For web session management with idle-timeout eviction, use
WebSessionManager directly — it has its own internal store with
access-time tracking. This type is kept for compatibility with the
crate::token_store::TokenStore trait (e.g. for InteractiveTokenProvider).
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryTokenStore
impl Debug for InMemoryTokenStore
Source§impl Default for InMemoryTokenStore
impl Default for InMemoryTokenStore
Source§fn default() -> InMemoryTokenStore
fn default() -> InMemoryTokenStore
Returns the “default value” for a type. Read more
Source§impl TokenStore for InMemoryTokenStore
impl TokenStore for InMemoryTokenStore
Auto Trait Implementations§
impl !Freeze for InMemoryTokenStore
impl RefUnwindSafe for InMemoryTokenStore
impl Send for InMemoryTokenStore
impl Sync for InMemoryTokenStore
impl Unpin for InMemoryTokenStore
impl UnsafeUnpin for InMemoryTokenStore
impl UnwindSafe for InMemoryTokenStore
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<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