#[non_exhaustive]pub struct CandidCallError {
pub message: String,
pub kind: CandidCallErrorKind,
pub context: Option<Box<CandidCallContext>>,
pub reject_response: Option<Box<RejectResponse>>,
}Expand description
CandidCallError
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.message: String§kind: CandidCallErrorKind§context: Option<Box<CandidCallContext>>§reject_response: Option<Box<RejectResponse>>Implementations§
Source§impl CandidCallError
impl CandidCallError
Sourcepub fn encode(context: CandidCallContext, source: impl Display) -> Self
pub fn encode(context: CandidCallContext, source: impl Display) -> Self
Capture one contextual Candid encode failure.
Sourcepub fn decode(
context: CandidCallContext,
bytes: usize,
source: impl Display,
) -> Self
pub fn decode( context: CandidCallContext, bytes: usize, source: impl Display, ) -> Self
Capture one contextual Candid decode failure.
Sourcepub fn canister_reject(
context: CandidCallContext,
response: RejectResponse,
) -> Self
pub fn canister_reject( context: CandidCallContext, response: RejectResponse, ) -> Self
Capture one structured rejection returned by PocketIC.
Sourcepub fn transport(context: CandidCallContext, source: impl Display) -> Self
pub fn transport(context: CandidCallContext, source: impl Display) -> Self
Capture one contextual PocketIC transport failure.
Sourcepub const fn kind(&self) -> CandidCallErrorKind
pub const fn kind(&self) -> CandidCallErrorKind
Read the structured failure kind.
Sourcepub fn context(&self) -> Option<&CandidCallContext>
pub fn context(&self) -> Option<&CandidCallContext>
Read the structured call context, when available.
Sourcepub fn reject_response(&self) -> Option<&RejectResponse>
pub fn reject_response(&self) -> Option<&RejectResponse>
Read the structured PocketIC rejection, when the call reached the IC.
Trait Implementations§
Source§impl Clone for CandidCallError
impl Clone for CandidCallError
Source§fn clone(&self) -> CandidCallError
fn clone(&self) -> CandidCallError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 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
1.30.0 · 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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.