Enum ic_ledger_types::TransferError
source · pub enum TransferError {
BadFee {
expected_fee: Tokens,
},
InsufficientFunds {
balance: Tokens,
},
TxTooOld {
allowed_window_nanos: u64,
},
TxCreatedInFuture,
TxDuplicate {
duplicate_of: BlockIndex,
},
}
Expand description
Error of the transfer
call.
Variants§
BadFee
The fee that the caller specified in the transfer request was not the one that the ledger expects.
The caller can change the transfer fee to the expected_fee
and retry the request.
InsufficientFunds
The caller did not have enough ICP in the specified subaccount.
TxTooOld
The request is too old. The ledger only accepts requests created within a 24-hour window. This is a non-recoverable error.
TxCreatedInFuture
The caller specified a created_at_time
that is too far in the future.
The caller can retry the request later.
This may also be caused by clock desynchronization.
TxDuplicate
Fields
§
duplicate_of: BlockIndex
The index of the block containing the original transaction.
The ledger has already executed the request.
Trait Implementations§
source§impl CandidType for TransferError
impl CandidType for TransferError
source§impl Clone for TransferError
impl Clone for TransferError
source§fn clone(&self) -> TransferError
fn clone(&self) -> TransferError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TransferError
impl Debug for TransferError
source§impl<'de> Deserialize<'de> for TransferError
impl<'de> Deserialize<'de> for TransferError
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for TransferError
impl Display for TransferError
source§impl PartialEq for TransferError
impl PartialEq for TransferError
source§fn eq(&self, other: &TransferError) -> bool
fn eq(&self, other: &TransferError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for TransferError
impl Serialize for TransferError
impl Eq for TransferError
impl StructuralPartialEq for TransferError
Auto Trait Implementations§
impl RefUnwindSafe for TransferError
impl Send for TransferError
impl Sync for TransferError
impl Unpin for TransferError
impl UnwindSafe for TransferError
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