pub enum Error {
InsufficientLiquidCycleBalance(InsufficientLiquidCycleBalance),
CallPerformFailed(CallPerformFailed),
CallRejected(CallRejected),
CandidDecodeFailed(CandidDecodeFailed),
}Expand description
Represents errors that can occur during inter-canister calls.
This is the top-level error type for the inter-canister call API.
This encapsulates all possible errors that can arise, including:
- Insufficient liquid cycle balance.
ic0.call_performfailed.- Asynchronously rejected.
- Candid decoding of the response failed.
Variants§
InsufficientLiquidCycleBalance(InsufficientLiquidCycleBalance)
The liquid cycle balance is insufficient to perform the call.
CallPerformFailed(CallPerformFailed)
The ic0.call_perform operation failed.
CallRejected(CallRejected)
The inter-canister call is rejected.
CandidDecodeFailed(CandidDecodeFailed)
The response from the inter-canister call could not be decoded as Candid.
This variant wraps errors that occur when attempting to decode the response into the expected Candid type.
Trait Implementations§
Source§impl CallErrorExt for Error
impl CallErrorExt for Error
Source§fn is_clean_reject(&self) -> bool
fn is_clean_reject(&self) -> bool
Checks if the error is a clean reject.
A clean reject means that there must be no state changes on the callee side.
Source§fn is_immediately_retryable(&self) -> bool
fn is_immediately_retryable(&self) -> bool
Determines if the failed call can be retried immediately within the update method
that’s handling the error, as opposed to relying on a background timer or heartbeat. Read more
Source§impl Error for Error
impl Error for Error
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<CallFailed> for Error
impl From<CallFailed> for Error
Source§fn from(e: CallFailed) -> Self
fn from(e: CallFailed) -> Self
Converts to this type from the input type.
Source§impl From<CallPerformFailed> for Error
impl From<CallPerformFailed> for Error
Source§fn from(source: CallPerformFailed) -> Self
fn from(source: CallPerformFailed) -> Self
Converts to this type from the input type.
Source§impl From<CallRejected> for Error
impl From<CallRejected> for Error
Source§fn from(source: CallRejected) -> Self
fn from(source: CallRejected) -> Self
Converts to this type from the input type.
Source§impl From<CandidDecodeFailed> for Error
impl From<CandidDecodeFailed> for Error
Source§fn from(source: CandidDecodeFailed) -> Self
fn from(source: CandidDecodeFailed) -> Self
Converts to this type from the input type.
Source§impl From<InsufficientLiquidCycleBalance> for Error
impl From<InsufficientLiquidCycleBalance> for Error
Source§fn from(source: InsufficientLiquidCycleBalance) -> Self
fn from(source: InsufficientLiquidCycleBalance) -> Self
Converts to this type from the input type.
Source§impl From<OnewayError> for Error
impl From<OnewayError> for Error
Source§fn from(e: OnewayError) -> Self
fn from(e: OnewayError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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