pub enum PayError {
WrongMint,
Empty,
Denomination(u64),
Paid(PublicKey),
Unaffordable {
spendable: u128,
needed: u128,
},
Fragmented {
largest: u64,
},
TooManyOutputs {
max_outputs: u8,
},
Policy(PolicyError),
Sign(Error),
}Expand description
A payment cannot be made.
Variants§
WrongMint
The request is for another mint than the view.
Empty
The request asks for nothing.
Denomination(u64)
The request asks for a note of an amount that is not one of the mint’s denominations, such as 0. The mint would refuse the transfer.
Paid(PublicKey)
The request asks for a note to a key this holder has paid already: by
a transfer still outgoing, by a payment it keeps, among the last
PAID_KEYS_KEPT keys it paid, or twice in the request. The payee
would keep only one of two notes to one key, and the mint would see
the key twice. Paying again takes a new request.
Unaffordable
Not enough value is spendable now. Frozen notes become spendable at the next rotation.
Fragmented
Enough value is spendable, but in notes too small for the notes the
request asks for. Ask the payee for a request with smaller notes; see
Holder::request_at_most.
TooManyOutputs
The change would take more notes than one transfer may create.
Policy(PolicyError)
A planned transfer breaks the mint’s policy. Plans follow the policy, so this means a bug.
Sign(Error)
Signing failed. The library refuses only malformed inputs, so this means the store is corrupt.
Trait Implementations§
impl Eq for PayError
Source§impl Error for PayError
impl Error for PayError
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()