pub trait Settleable {
type Success;
type Failure;
// Required methods
fn into_command(self) -> PrnsCommand;
fn from_settlement(
settlement: Settlement,
) -> Option<Result<Self::Success, Self::Failure>>;
}Expand description
A command’s *Rejection enum names the reasons ingest refuses it at the door; its *Failure enum is everything the awaiting caller can see, wrapping those same door refusals as Rejected(*Rejection) beside the ways an accepted command can still fail later, where a broken lower layer surfaces as a *Error payload.
A command that cannot be refused at the door has no *Rejection, and one with a single refusal reason may inline it.
Required Associated Types§
Required Methods§
fn into_command(self) -> PrnsCommand
fn from_settlement( settlement: Settlement, ) -> Option<Result<Self::Success, Self::Failure>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".