struct Inner {
records: HashMap<String, DecisionRecord>,
tokens: HashMap<String, String>,
redirects: HashMap<String, String>,
seen: HashSet<(String, String)>,
remembered: HashMap<(String, String), Remembered>,
sequence: u64,
}Fields§
§records: HashMap<String, DecisionRecord>§tokens: HashMap<String, String>§redirects: HashMap<String, String>The redirect each approval holds for a browser, by request_uri.
seen: HashSet<(String, String)>§remembered: HashMap<(String, String), Remembered>Each account’s remembered approval of a client, by the account’s DID and the client’s content key.
sequence: u64Implementations§
Source§impl Inner
impl Inner
Sourcefn sweep(&mut self, now: OffsetDateTime)
fn sweep(&mut self, now: OffsetDateTime)
Expires what has run out and forgets it, answered or not.
Sourcefn live_for(&self, account: &str) -> usize
fn live_for(&self, account: &str) -> usize
How many of this account’s records await an answer. sweep has
already run, so each of them is still live.
Sourcefn displace_oldest_for(&mut self, account: &str) -> Option<Displaced>
fn displace_oldest_for(&mut self, account: &str) -> Option<Displaced>
Removes this account’s oldest undecided record — arrival order, which
sequence is — and says what it was, for the caller to undo.
An answered record is never the one displaced: the bound counts only undecided records, and an answer stays for the authorize page to report until its request expires.
Sourcefn has_room(&self, total: usize) -> bool
fn has_room(&self, total: usize) -> bool
The server-wide bound, read from one place so
DecisionStore::put and DecisionStore::check_room agree on it.
Sourcefn settle(
&mut self,
request_uri: &str,
state: DecisionState,
redirect: Option<String>,
now: OffsetDateTime,
) -> Option<DecisionRecord>
fn settle( &mut self, request_uri: &str, state: DecisionState, redirect: Option<String>, now: OffsetDateTime, ) -> Option<DecisionRecord>
DecisionStore::settle, holding redirect when the answer is an
approval that carries one.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Inner
impl RefUnwindSafe for Inner
impl Send for Inner
impl Sync for Inner
impl Unpin for Inner
impl UnsafeUnpin for Inner
impl UnwindSafe for Inner
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
§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>
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>
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