pub enum Decision {
AuthorizationRequired {
transaction_id: String,
pending_agents: Vec<String>,
},
PolicySatisfactionRequired {
transaction_id: String,
requested_by: String,
},
SettlementRequired {
transaction_id: String,
},
}Expand description
A decision that an external system must make before the FSM can advance.
When the FSM reaches a decision point, it returns one of these variants describing the choices available. The external system (compliance engine, human operator, business rules) must call back with the chosen action.
Variants§
AuthorizationRequired
A new transaction was received. The external system must decide how to respond.
Available actions:
- Send
Authorizeto approve - Send
Rejectto deny - Send
UpdatePoliciesto request more information - Send
RequestPresentationto request credentials - Do nothing (wait for more context)
Fields
PolicySatisfactionRequired
Outstanding policies must be satisfied before authorization can proceed. The external system must gather the required data and submit it.
Available actions:
- Send
Presentationwith requested credentials - Send
ConfirmRelationshipto prove agent-party link - Send
Rejectif policies cannot be satisfied - Send
Cancelto abort
Fields
SettlementRequired
All agents have authorized. The originator must decide whether to execute settlement on-chain and send a Settle message.
Available actions:
- Execute on-chain settlement and send
Settle - Send
Cancelif settlement should not proceed
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Decision
impl<'de> Deserialize<'de> for Decision
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Decision
impl RefUnwindSafe for Decision
impl Send for Decision
impl Sync for Decision
impl Unpin for Decision
impl UnsafeUnpin for Decision
impl UnwindSafe for Decision
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
Mutably borrows from an owned value. Read more
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>
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 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.