pub enum TransactionState {
Received,
PolicyRequired,
PartiallyAuthorized,
ReadyToSettle,
Settled,
Rejected,
Cancelled,
Reverted,
}Expand description
Top-level state of a TAP transaction.
These states represent the full lifecycle from initiation to terminal states. The FSM enforces that only valid transitions occur.
Variants§
Received
Transaction initiated — a Transfer or Payment has been received and stored. The node must now decide how to respond (authorize, reject, request more info, or wait for external input).
PolicyRequired
One or more counterparty policies must be satisfied before authorization can proceed. The node is waiting for the external system to gather and submit the required presentations or proofs.
PartiallyAuthorized
At least one agent has authorized but not all required agents have done so yet. The transaction is waiting for remaining authorizations.
ReadyToSettle
All required agents have authorized. The originator may now settle the transaction on-chain. This is a decision point — the node must decide whether to proceed with settlement.
Settled
The originator has sent a Settle message (with an on-chain transaction reference). The transaction is considered complete.
Rejected
An agent has rejected the transaction. Terminal state.
Cancelled
A party has cancelled the transaction. Terminal state.
Reverted
A previously settled transaction has been reverted. Terminal state.
Implementations§
Source§impl TransactionState
impl TransactionState
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Returns true if this is a terminal state (no further transitions).
Sourcepub fn requires_decision(&self) -> bool
pub fn requires_decision(&self) -> bool
Returns true if this state requires an external decision before the transaction can advance.
Trait Implementations§
Source§impl Clone for TransactionState
impl Clone for TransactionState
Source§fn clone(&self) -> TransactionState
fn clone(&self) -> TransactionState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransactionState
impl Debug for TransactionState
Source§impl<'de> Deserialize<'de> for TransactionState
impl<'de> Deserialize<'de> for TransactionState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for TransactionState
impl Display for TransactionState
Source§impl FromStr for TransactionState
impl FromStr for TransactionState
Source§impl Hash for TransactionState
impl Hash for TransactionState
Source§impl PartialEq for TransactionState
impl PartialEq for TransactionState
Source§impl Serialize for TransactionState
impl Serialize for TransactionState
impl Eq for TransactionState
impl StructuralPartialEq for TransactionState
Auto Trait Implementations§
impl Freeze for TransactionState
impl RefUnwindSafe for TransactionState
impl Send for TransactionState
impl Sync for TransactionState
impl Unpin for TransactionState
impl UnsafeUnpin for TransactionState
impl UnwindSafe for TransactionState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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>
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.