pub enum SpendError {
LimitExceeded {
limit: SpendKey,
max_micro_usd: u64,
consumed_micro_usd: u64,
requested_micro_usd: u64,
},
UnknownReservation(ReservationId),
AmountTooLarge(u64),
Unavailable(String),
}Expand description
Failures specific to spend ledgers. Converts into AdkError.
Variants§
LimitExceeded
The reservation would take a scope past its cap.
Fields
UnknownReservation(ReservationId)
The reservation does not exist or was already committed or released.
AmountTooLarge(u64)
The amount does not fit the ledger’s storage.
The ledger’s backing store could not be reached or failed.
Trait Implementations§
Source§impl Clone for SpendError
impl Clone for SpendError
Source§impl Debug for SpendError
impl Debug for SpendError
Source§impl Display for SpendError
impl Display for SpendError
impl Eq for SpendError
Source§impl Error for SpendError
impl Error for SpendError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<SpendError> for AdkError
impl From<SpendError> for AdkError
Source§fn from(error: SpendError) -> Self
fn from(error: SpendError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for SpendError
impl PartialEq for SpendError
impl StructuralPartialEq for SpendError
Auto Trait Implementations§
impl Forget for SpendError
impl Freeze for SpendError
impl Move for SpendError
impl RefUnwindSafe for SpendError
impl Send for SpendErrorwhere
RawVecInner: Send,
impl Sync for SpendErrorwhere
RawVecInner: Sync,
impl Unpin for SpendError
impl UnsafeUnpin for SpendError
impl UnwindSafe for SpendErrorwhere
RawVecInner: UnwindSafe,
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