pub enum FsmEvent {
TransactionReceived {
agent_dids: Vec<String>,
},
AuthorizeReceived {
agent_did: String,
settlement_address: Option<String>,
expiry: Option<String>,
},
RejectReceived {
agent_did: String,
reason: Option<String>,
},
CancelReceived {
by_did: String,
reason: Option<String>,
},
PoliciesReceived {
from_did: String,
},
PresentationReceived {
from_did: String,
},
SettleReceived {
settlement_id: Option<String>,
amount: Option<String>,
},
RevertReceived {
by_did: String,
reason: String,
},
AgentsAdded {
agent_dids: Vec<String>,
},
AgentRemoved {
agent_did: String,
},
}Expand description
An event that can trigger a state transition in the FSM.
Each variant corresponds to a TAP message type that affects transaction state. Events carry only the data needed for the state transition, not the full message payload.
Variants§
TransactionReceived
A new Transfer or Payment was received, initiating the transaction.
AuthorizeReceived
An agent sent an Authorize message for this transaction.
Fields
RejectReceived
An agent sent a Reject message for this transaction.
Fields
CancelReceived
A party sent a Cancel message.
Fields
PoliciesReceived
A counterparty sent UpdatePolicies, indicating requirements that must be fulfilled before they will authorize.
PresentationReceived
A Presentation was received satisfying (some) outstanding policies.
SettleReceived
The originator sent a Settle message with an on-chain reference.
Fields
RevertReceived
A party sent a Revert message for a settled transaction.
AgentsAdded
New agents were added to the transaction (TAIP-5).
AgentRemoved
An agent was removed from the transaction (TAIP-5).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FsmEvent
impl<'de> Deserialize<'de> for FsmEvent
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>,
Auto Trait Implementations§
impl Freeze for FsmEvent
impl RefUnwindSafe for FsmEvent
impl Send for FsmEvent
impl Sync for FsmEvent
impl Unpin for FsmEvent
impl UnsafeUnpin for FsmEvent
impl UnwindSafe for FsmEvent
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<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.