pub struct MemoryTokenStore(/* private fields */);Expand description
A TokenStore in this process’s memory, gone when it is dropped.
Trait Implementations§
Source§impl Debug for MemoryTokenStore
impl Debug for MemoryTokenStore
Source§impl Default for MemoryTokenStore
impl Default for MemoryTokenStore
Source§impl TokenStore for MemoryTokenStore
impl TokenStore for MemoryTokenStore
Source§fn load<'a>(
&'a self,
key: &'a str,
) -> WasmBoxedFuture<'a, Result<Option<String>, BoxError>>
fn load<'a>( &'a self, key: &'a str, ) -> WasmBoxedFuture<'a, Result<Option<String>, BoxError>>
The record kept under
key, or None when there is none. An error
means the store could not answer, and fails the request.Source§fn save<'a>(
&'a self,
key: &'a str,
record: &'a str,
) -> WasmBoxedFuture<'a, Result<(), BoxError>>
fn save<'a>( &'a self, key: &'a str, record: &'a str, ) -> WasmBoxedFuture<'a, Result<(), BoxError>>
Keep
record under key, replacing any record there.Source§fn delete<'a>(
&'a self,
key: &'a str,
) -> WasmBoxedFuture<'a, Result<(), BoxError>>
fn delete<'a>( &'a self, key: &'a str, ) -> WasmBoxedFuture<'a, Result<(), BoxError>>
Forget the record under
key; forgetting a missing record succeeds.Source§fn lock<'a>(
&'a self,
_key: &'a str,
) -> WasmBoxedFuture<'a, Result<StoreLock, BoxError>>
fn lock<'a>( &'a self, _key: &'a str, ) -> WasmBoxedFuture<'a, Result<StoreLock, BoxError>>
Hold the record under
key until the returned StoreLock is
dropped, against every other holder of it, in this process or
another (such as a refresh another rig runs at the same moment). The
default holds nothing: a store no other process reads needs no
lock beyond the authenticator’s own.Auto Trait Implementations§
impl !Freeze for MemoryTokenStore
impl RefUnwindSafe for MemoryTokenStore
impl Send for MemoryTokenStore
impl Sync for MemoryTokenStore
impl Unpin for MemoryTokenStore
impl UnsafeUnpin for MemoryTokenStore
impl UnwindSafe for MemoryTokenStore
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> 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