pub struct MemoryConsentStore {
entries: RwLock<HashMap<String, PendingConsent>>,
}Expand description
The in-process consent store.
Fields§
§entries: RwLock<HashMap<String, PendingConsent>>Implementations§
Trait Implementations§
Source§impl ConsentStore for MemoryConsentStore
impl ConsentStore for MemoryConsentStore
Source§fn mint(&self, pending: PendingConsent) -> ConsentReference
fn mint(&self, pending: PendingConsent) -> ConsentReference
Mints and stores a fresh reference for
pending.Source§fn consume(&self, reference: &ConsentReference) -> Option<PendingConsent>
fn consume(&self, reference: &ConsentReference) -> Option<PendingConsent>
Marks the reference consumed and returns what it was pending, if it
was live. Consuming happens whether
confirm goes on to approve or
refuse: a reference is single-use either way, so a caller cannot
retry a refused reference hoping for a different stamped identity.Source§fn discard(&self, reference: &ConsentReference)
fn discard(&self, reference: &ConsentReference)
Removes a reference
ConsentStore::mint minted moments earlier,
because the decision record it was for was not, after all, stored. Read moreSource§impl Debug for MemoryConsentStore
impl Debug for MemoryConsentStore
Source§impl Default for MemoryConsentStore
impl Default for MemoryConsentStore
Source§fn default() -> MemoryConsentStore
fn default() -> MemoryConsentStore
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for MemoryConsentStore
impl RefUnwindSafe for MemoryConsentStore
impl Send for MemoryConsentStore
impl Sync for MemoryConsentStore
impl Unpin for MemoryConsentStore
impl UnsafeUnpin for MemoryConsentStore
impl UnwindSafe for MemoryConsentStore
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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