#[non_exhaustive]pub enum CandidCallError {
Encode {
context: Box<CandidCallContext>,
message: String,
},
Decode {
context: Box<CandidCallContext>,
bytes: usize,
source: Box<DecodeError>,
},
CanisterReject {
context: Box<CandidCallContext>,
response: Box<RejectResponse>,
},
Transport {
context: Box<CandidCallContext>,
source: PocketIcOperationError,
},
}Expand description
Structured failure from a super::CandidCallExt operation.
Match the variant to inspect its required context and original failure details.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Encode
Arguments could not be Candid-encoded.
Fields
§
context: Box<CandidCallContext>Target, caller, method and raw PocketIC operation.
Decode
Successful response bytes could not be Candid-decoded.
Fields
§
context: Box<CandidCallContext>Target, caller, method and raw PocketIC operation.
§
source: Box<DecodeError>Original bounded decoder failure.
CanisterReject
PocketIC returned a structured canister rejection.
Fields
§
context: Box<CandidCallContext>Target, caller, method and raw PocketIC operation.
§
response: Box<RejectResponse>Complete upstream rejection.
Transport
The PocketIC instance became unreachable.
Fields
§
context: Box<CandidCallContext>Target, caller, method and raw PocketIC operation.
§
source: PocketIcOperationErrorOriginal upstream operation failure and transport classification.
Trait Implementations§
Source§impl Debug for CandidCallError
impl Debug for CandidCallError
Source§impl Display for CandidCallError
impl Display for CandidCallError
Source§impl Error for CandidCallError
impl Error for CandidCallError
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()
Auto Trait Implementations§
impl Freeze for CandidCallError
impl RefUnwindSafe for CandidCallError
impl Send for CandidCallError
impl Sync for CandidCallError
impl Unpin for CandidCallError
impl UnsafeUnpin for CandidCallError
impl UnwindSafe for CandidCallError
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