pub struct InternalError { /* private fields */ }Expand description
InternalError
Internal, structured error type.
This error:
- is NOT Candid-exposed
- is NOT stable across versions
- may evolve freely
All canister endpoints must convert this into a public error envelope defined in dto/.
Implementations§
Source§impl InternalError
impl InternalError
pub fn new( class: InternalErrorClass, origin: InternalErrorOrigin, message: impl Into<String>, ) -> Self
pub fn public(err: PublicError) -> Self
pub fn domain(origin: InternalErrorOrigin, message: impl Into<String>) -> Self
pub fn invariant( origin: InternalErrorOrigin, message: impl Into<String>, ) -> Self
pub fn infra(origin: InternalErrorOrigin, message: impl Into<String>) -> Self
pub fn ops(origin: InternalErrorOrigin, message: impl Into<String>) -> Self
pub fn workflow(origin: InternalErrorOrigin, message: impl Into<String>) -> Self
pub const fn class(&self) -> InternalErrorClass
pub const fn origin(&self) -> InternalErrorOrigin
pub const fn log_fields(&self) -> (InternalErrorClass, InternalErrorOrigin)
pub const fn public_error(&self) -> Option<&PublicError>
Trait Implementations§
Source§impl Debug for InternalError
impl Debug for InternalError
Source§impl Display for InternalError
impl Display for InternalError
Source§impl Error for InternalError
impl Error for InternalError
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 From<&InternalError> for Error
impl From<&InternalError> for Error
Source§fn from(err: &InternalError) -> Self
fn from(err: &InternalError) -> Self
Converts to this type from the input type.
Source§impl From<AccessError> for InternalError
impl From<AccessError> for InternalError
Source§fn from(err: AccessError) -> Self
fn from(err: AccessError) -> Self
Converts to this type from the input type.
Source§impl From<DomainError> for InternalError
impl From<DomainError> for InternalError
Source§fn from(err: DomainError) -> Self
fn from(err: DomainError) -> Self
Converts to this type from the input type.
Source§impl From<InternalError> for Error
impl From<InternalError> for Error
Source§fn from(err: InternalError) -> Self
fn from(err: InternalError) -> Self
Converts to this type from the input type.
Source§impl From<PolicyError> for InternalError
impl From<PolicyError> for InternalError
Source§fn from(err: PolicyError) -> Self
fn from(err: PolicyError) -> Self
Converts to this type from the input type.
Source§impl From<PoolPolicyError> for InternalError
impl From<PoolPolicyError> for InternalError
Source§fn from(err: PoolPolicyError) -> Self
fn from(err: PoolPolicyError) -> Self
Converts to this type from the input type.
Source§impl From<ScalingPolicyError> for InternalError
impl From<ScalingPolicyError> for InternalError
Source§fn from(err: ScalingPolicyError) -> Self
fn from(err: ScalingPolicyError) -> Self
Converts to this type from the input type.
Source§impl From<TopologyPolicyError> for InternalError
impl From<TopologyPolicyError> for InternalError
Source§fn from(err: TopologyPolicyError) -> Self
fn from(err: TopologyPolicyError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InternalError
impl RefUnwindSafe for InternalError
impl Send for InternalError
impl Sync for InternalError
impl Unpin for InternalError
impl UnsafeUnpin for InternalError
impl UnwindSafe for InternalError
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