Enum PayError
pub enum PayError {
AttestationInvalid(String),
SettlementNotFound(String),
SettlementNotCommitted(String, String),
AlreadyIssued(String),
LedgerError(String),
UnknownResourceClass(String),
QuoteExpired,
QuantumExceedsMaximum {
requested: u64,
max: u64,
},
Internal(String),
}Expand description
Errors from the settlement/tariff protocol.
Variants§
AttestationInvalid(String)
The settlement attestation failed PQ-hybrid signature verification or the issuer’s key material is unknown.
SettlementNotFound(String)
No committed settlement row was found for the given settlement id.
SettlementNotCommitted(String, String)
The settlement row exists but is not in the settlement_committed
state — issuance requires a fully verified, server-validated
settlement.
AlreadyIssued(String)
The settlement row exists and is committed, but credits were already issued for it. This is a success case (idempotent replay) — the original transfer id and outcome are returned.
LedgerError(String)
The ledger rejected the issuance (insufficient issuer liability, unknown destination account, internal error, etc.).
UnknownResourceClass(String)
The tariff request named an unknown resource class or catalog version.
QuoteExpired
The quote has expired.
QuantumExceedsMaximum
The requested quantum exceeds the server-imposed maximum.
Internal(String)
An internal error (transport, serialization, etc.).
Trait Implementations§
§impl Error for PayError
impl Error for PayError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for PayError
impl RefUnwindSafe for PayError
impl Send for PayError
impl Sync for PayError
impl Unpin for PayError
impl UnsafeUnpin for PayError
impl UnwindSafe for PayError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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