#[non_exhaustive]pub struct PicCallError {
pub message: String,
pub kind: PicCallErrorKind,
pub context: Option<Box<PicCallContext>>,
}Expand description
PicCallError
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: PicCallErrorKind§context: Option<Box<PicCallContext>>Implementations§
Source§impl PicCallError
impl PicCallError
Sourcepub fn encode(context: PicCallContext, source: impl Display) -> Self
pub fn encode(context: PicCallContext, source: impl Display) -> Self
Capture one contextual Candid encode failure.
Sourcepub fn decode(
context: PicCallContext,
bytes: usize,
source: impl Display,
) -> Self
pub fn decode( context: PicCallContext, bytes: usize, source: impl Display, ) -> Self
Capture one contextual Candid decode failure.
Sourcepub fn transport(context: PicCallContext, source: impl Display) -> Self
pub fn transport(context: PicCallContext, source: impl Display) -> Self
Capture one contextual PocketIC transport failure.
Sourcepub const fn kind(&self) -> PicCallErrorKind
pub const fn kind(&self) -> PicCallErrorKind
Read the structured failure kind.
Sourcepub fn context(&self) -> Option<&PicCallContext>
pub fn context(&self) -> Option<&PicCallContext>
Read the structured call context, when available.
Trait Implementations§
Source§impl Clone for PicCallError
impl Clone for PicCallError
Source§fn clone(&self) -> PicCallError
fn clone(&self) -> PicCallError
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 PicCallError
impl Debug for PicCallError
Source§impl Display for PicCallError
impl Display for PicCallError
Source§impl Error for PicCallError
impl Error for PicCallError
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 PicCallError
impl PartialEq for PicCallError
Source§fn eq(&self, other: &PicCallError) -> bool
fn eq(&self, other: &PicCallError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for PicCallError
impl StructuralPartialEq for PicCallError
Auto Trait Implementations§
impl Freeze for PicCallError
impl RefUnwindSafe for PicCallError
impl Send for PicCallError
impl Sync for PicCallError
impl Unpin for PicCallError
impl UnsafeUnpin for PicCallError
impl UnwindSafe for PicCallError
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<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.