Skip to main content

Crate error_ctx

Crate error_ctx 

Source
Expand description

Minimal context error crate: every error has Temporary/Permanent status, and the only public error type (CtxReport) requires at least one context layer. The internal type (Report) is not exported, so public APIs cannot return it.

Macros§

ctx_err
Creates a CtxReport from a message (permanent) or (status, message).

Structs§

CtxReport
Contextual error report: at least one context layer, and a status. This is the only error type exported; use it in all public APIs.

Enums§

ErrorStatus
Whether the operation is safe to retry.

Traits§

ErrorStatusExt
Allows an error type to declare its default status when wrapped. Default returns Permanent. Implement for error types used with .context().
ResultCtxExt
Add context when propagating. Use .context(msg) or .with_context(|| msg) on a Result; use the same names on a CtxReport to add another layer. One vocabulary for both.

Type Aliases§

Result