pub struct ApplicationError { /* private fields */ }Expand description
One fully checked bounded application-semantic failure.
Implementations§
Source§impl ApplicationError
impl ApplicationError
Sourcepub const fn new(
code: ApplicationErrorCode,
operation: ApplicationOperation,
context: ApplicationErrorContext,
incident_id: Option<IncidentId>,
) -> Self
pub const fn new( code: ApplicationErrorCode, operation: ApplicationOperation, context: ApplicationErrorContext, incident_id: Option<IncidentId>, ) -> Self
Constructs one registry-owned error with already checked context.
Sourcepub fn from_public_error(
error: &PublicError,
operation: ApplicationOperation,
context: ApplicationErrorContext,
) -> Self
pub fn from_public_error( error: &PublicError, operation: ApplicationOperation, context: ApplicationErrorContext, ) -> Self
Lifts one compatible kernel failure into symbolic application context.
Kernel validation paths are intentionally not copied because they carry compiler IDs rather than application symbols.
Sourcepub const fn code(&self) -> ApplicationErrorCode
pub const fn code(&self) -> ApplicationErrorCode
Stable code.
Sourcepub const fn operation(&self) -> ApplicationOperation
pub const fn operation(&self) -> ApplicationOperation
Application operation.
Sourcepub const fn context(&self) -> &ApplicationErrorContext
pub const fn context(&self) -> &ApplicationErrorContext
Checked safe context.
Sourcepub const fn incident_id(&self) -> Option<&IncidentId>
pub const fn incident_id(&self) -> Option<&IncidentId>
Opaque incident identity.
Sourcepub const fn category(&self) -> ApplicationErrorCategory
pub const fn category(&self) -> ApplicationErrorCategory
Closed category.
Sourcepub const fn safe_message(&self) -> &'static str
pub const fn safe_message(&self) -> &'static str
Stable public message.
Sourcepub const fn recovery_action(&self) -> ApplicationRecoveryAction
pub const fn recovery_action(&self) -> ApplicationRecoveryAction
Recovery action.
Sourcepub const fn fixes(&self) -> &'static [ApplicationFixCode]
pub const fn fixes(&self) -> &'static [ApplicationFixCode]
Deterministic remediation codes.
Trait Implementations§
Source§impl Clone for ApplicationError
impl Clone for ApplicationError
Source§impl Debug for ApplicationError
impl Debug for ApplicationError
Source§impl Display for ApplicationError
impl Display for ApplicationError
impl Eq for ApplicationError
Source§impl Error for ApplicationError
impl Error for ApplicationError
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 ApplicationError
impl PartialEq for ApplicationError
impl StructuralPartialEq for ApplicationError
Auto Trait Implementations§
impl Freeze for ApplicationError
impl RefUnwindSafe for ApplicationError
impl Send for ApplicationError
impl Sync for ApplicationError
impl Unpin for ApplicationError
impl UnsafeUnpin for ApplicationError
impl UnwindSafe for ApplicationError
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