#[non_exhaustive]pub enum CandidCallError {
Encode {
context: Box<CandidCallContext>,
message: String,
},
Decode {
context: Box<CandidCallContext>,
bytes: usize,
message: String,
},
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.
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 Clone for CandidCallError
impl Clone for CandidCallError
Source§impl Debug for CandidCallError
impl Debug for CandidCallError
Source§impl Display for CandidCallError
impl Display for CandidCallError
impl Eq 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()
Source§impl PartialEq for CandidCallError
impl PartialEq for CandidCallError
impl StructuralPartialEq for CandidCallError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.