pub struct Error { /* private fields */ }Expand description
Error
Public API error payload. Only registered runtime reasons may originate a
value; Candid/Serde decoding may still preserve any raw u16.
Implementations§
Source§impl Error
impl Error
Sourcepub const fn from_registered(code: RegisteredDiagnosticCode) -> Self
pub const fn from_registered(code: RegisteredDiagnosticCode) -> Self
Originate a public error from a registered reason.
Sourcepub const fn code(&self) -> DiagnosticCode
pub const fn code(&self) -> DiagnosticCode
Observe the lossless diagnostic identity.
Trait Implementations§
Source§impl CandidType for Error
impl CandidType for Error
impl Copy for Error
Source§impl<'de> Deserialize<'de> for Error
impl<'de> Deserialize<'de> for Error
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
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