pub struct InMemoryStateStore { /* private fields */ }Expand description
Ephemeral, in-process StateStore. The default when no persistent backend
is configured; also handy in tests.
Implementations§
Trait Implementations§
Source§impl Debug for InMemoryStateStore
impl Debug for InMemoryStateStore
Source§impl Default for InMemoryStateStore
impl Default for InMemoryStateStore
Source§fn default() -> InMemoryStateStore
fn default() -> InMemoryStateStore
Returns the “default value” for a type. Read more
Source§impl StateStore for InMemoryStateStore
impl StateStore for InMemoryStateStore
Source§fn get(&self, host: &str) -> Result<Option<DomainState>, Error>
fn get(&self, host: &str) -> Result<Option<DomainState>, Error>
Fetch the stored state for
host, if any.Source§fn put(&self, state: &DomainState) -> Result<(), Error>
fn put(&self, state: &DomainState) -> Result<(), Error>
Insert or replace the state for
state.host.Source§fn remove(&self, host: &str) -> Result<(), Error>
fn remove(&self, host: &str) -> Result<(), Error>
Delete any stored state for
host (no-op if absent).Source§fn update(
&self,
host: &str,
update: &mut dyn FnMut(DomainState) -> DomainState,
) -> Result<DomainState, Error>
fn update( &self, host: &str, update: &mut dyn FnMut(DomainState) -> DomainState, ) -> Result<DomainState, Error>
Atomically read-modify-write the state for
host. Read moreAuto Trait Implementations§
impl !Freeze for InMemoryStateStore
impl RefUnwindSafe for InMemoryStateStore
impl Send for InMemoryStateStore
impl Sync for InMemoryStateStore
impl Unpin for InMemoryStateStore
impl UnsafeUnpin for InMemoryStateStore
impl UnwindSafe for InMemoryStateStore
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