Skip to main content

Crate cirious_codex_result

Crate cirious_codex_result 

Source
Expand description

§Cirious Codex Result

cirious_codex_result is a robust diagnostic framework tailored for the Cirious ecosystem. It provides an enhanced replacement for the standard library’s Result type, enforcing rich context, caller location tracking, and structured metadata on both success (Ok) and failure (Err) paths.

§Overview

  • CodexError: Represents a failed execution with actionable suggestions, location tracking, and backtraces.
  • CodexOk: Wraps successful executions, allowing the injection of metrics or metadata.
  • Result: The central alias uniting CodexOk and CodexError.

Re-exports§

pub use error::CodexError;
pub use error::IntoCodex;
pub use ok::CodexOk;
pub use ok::CodexOkRaw;
pub use ok::CodexOkWrap;
pub use ok::ExecutionContext;
pub use ok::log_codex_ok;serde

Modules§

error
Error result encapsulation for the Cirious Codex diagnostic framework.
macros
Macros
ok
Success result encapsulation for the Cirious Codex diagnostic framework.

Macros§

codex_bail
Macro for immediate exit from a function with a CodexError.
codex_ensure
Macro for validating a condition and returning a CodexError if it fails.
codex_ok
Macro for quickly wrapping a value and optional metadata into an Ok(CodexOk).

Type Aliases§

Result
The core diagnostic result type for the Cirious ecosystem.