#[repr(u32)]pub enum RejectCode {
SysFatal = 1,
SysTransient = 2,
DestinationInvalid = 3,
CanisterReject = 4,
CanisterError = 5,
SysUnknown = 6,
Unrecognized(u32),
}
Expand description
Classifies why an API request or inter-canister call in the IC is rejected.
§Note
Zero (0) is not a valid reject code. Converting 0 into this enum will return an error.
See Reject codes for more details.
Variants§
SysFatal = 1
Fatal system error, retry unlikely to be useful.
SysTransient = 2
Transient system error, retry might be possible.
DestinationInvalid = 3
Invalid destination (e.g. canister/account does not exist).
CanisterReject = 4
Explicit reject by the canister.
CanisterError = 5
Canister error (e.g., trap, no response).
SysUnknown = 6
Response unknown; system stopped waiting for it (e.g., timed out, or system under high load).
Unrecognized(u32)
Unrecognized reject code.
§Note
This variant is not part of the IC interface spec, and is used to represent reject codes that are not recognized by the library.
This variant is needed just in case the IC introduces new reject codes in the future. If that happens, a Canister using existing library versions will still be able to convert the new reject codes to this variant without panicking.
Trait Implementations§
Source§impl Clone for RejectCode
impl Clone for RejectCode
Source§fn clone(&self) -> RejectCode
fn clone(&self) -> RejectCode
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read more