Skip to main content

Crate ntex_error

Crate ntex_error 

Source
Expand description

Structured error context and diagnostics for ntex.

Error is a cheap-to-clone error container that preserves service attribution, tags, typed context, and backtraces. Implement ErrorDiagnostic on application errors to provide stable signatures and diagnostic metadata.

Failure provides a type-erased failure representation, while ErrorMessage and ErrorMessageChained are lightweight message errors.

Re-exports§

pub use crate::utils::ResultSignature;
pub use crate::utils::Retryable;
pub use crate::utils::Success;
pub use crate::utils::with_service;

Modules§

utils
Helper traits, types, and functions.

Structs§

Backtrace
Representation of a backtrace.
BacktraceRaw
Representation of a backtrace.
BacktraceResolver
Backtrace resolver.
Error
An error container.
ErrorMessage
A lightweight owned error message.
ErrorMessageChained
An owned error message with an optional source error.
Failure
Type-erased container holding error information.
FailureDiagnostic
Type-erased diagnostic view of a Failure.

Enums§

ResultType
The type of the result.

Traits§

AsError
Provides access to an error’s diagnostic representation.
ErrorDiagnostic
Provides diagnostic information for errors.
ErrorMapping
Helper trait for converting a value into a unified error-aware result type.
IntoFailure
Helper trait for converting a value into a type-erased Failure.

Functions§

fmt_diag
Formats a full diagnostic view of an error for logging and tracing.
fmt_diag_string
Formats a full diagnostic view of an error for logging and tracing.
fmt_diag_typ
Formats a full diagnostic view of an error for logging and tracing.
fmt_err
Writes an error and its source chain.
fmt_err_string
Formats an error and its source chain into a string.