pub enum DecisionMode {
AutoApprove,
EventBus,
Custom(Arc<dyn DecisionHandler>),
}Expand description
Controls how the node handles decision points during transaction processing.
This enum is set on [NodeConfig] and determines which
DecisionHandler implementation the StandardTransactionProcessor
uses at runtime.
Variants§
AutoApprove
Automatically approve all decisions — the node will immediately send Authorize messages for registered agents and Settle when all agents have authorized. This is the current default behavior and is suitable for testing or fully-automated deployments.
EventBus
Publish each decision as a [NodeEvent::DecisionRequired] on the
event bus. No automatic action is taken — an external subscriber
(compliance engine, human operator UI, business rules engine) must
listen for these events and call back into the node to advance the
transaction.
Custom(Arc<dyn DecisionHandler>)
Use a custom decision handler provided by the caller.
Trait Implementations§
Source§impl Clone for DecisionMode
impl Clone for DecisionMode
Source§fn clone(&self) -> DecisionMode
fn clone(&self) -> DecisionMode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DecisionMode
impl Debug for DecisionMode
Source§impl Default for DecisionMode
impl Default for DecisionMode
Source§fn default() -> DecisionMode
fn default() -> DecisionMode
Auto Trait Implementations§
impl Freeze for DecisionMode
impl !RefUnwindSafe for DecisionMode
impl Send for DecisionMode
impl Sync for DecisionMode
impl Unpin for DecisionMode
impl UnsafeUnpin for DecisionMode
impl !UnwindSafe for DecisionMode
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 more