pub enum DecisionState {
Pending,
Approved,
Declined,
Expired,
}Expand description
Where one decision record is in its life.
The whole state machine, in one place: a record is minted
DecisionState::Pending at PAR and leaves that state exactly once —
the named account approves it, the named account declines it, or its
pushed request outlives its window and a sweep marks it
DecisionState::Expired. There is no path back to Pending and no
transition between the three terminal states. Only a Pending record is
listed to an agent, and only a Pending record can be approved.
A record can also stop existing without reaching any of the three: the
account’s newest push displaces its oldest undecided record when the
account is at its bound (DecisionStore::put). A displaced record is
removed rather than settled, so everything downstream sees exactly what
it sees for one that expired and was swept.
Variants§
Pending
Minted, and nobody has answered.
Approved
The named account approved it, and a code was issued.
Declined
The named account said no.
Expired
Nobody answered before the pushed request’s window closed.
Implementations§
Trait Implementations§
Source§impl Clone for DecisionState
impl Clone for DecisionState
Source§fn clone(&self) -> DecisionState
fn clone(&self) -> DecisionState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecisionState
impl Debug for DecisionState
Source§impl PartialEq for DecisionState
impl PartialEq for DecisionState
Source§fn eq(&self, other: &DecisionState) -> bool
fn eq(&self, other: &DecisionState) -> bool
self and other values to be equal, and is used by ==.impl Copy for DecisionState
impl Eq for DecisionState
impl StructuralPartialEq for DecisionState
Auto Trait Implementations§
impl Freeze for DecisionState
impl RefUnwindSafe for DecisionState
impl Send for DecisionState
impl Sync for DecisionState
impl Unpin for DecisionState
impl UnsafeUnpin for DecisionState
impl UnwindSafe for DecisionState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§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