1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//! Chaining Example
//!
//! This example demonstrates how to use the `?` operator with `cirious_codex_result`
//! to compose multiple fallible operations into a clean, sequential flow.
use ;
/// Performs the initial step in the sequence.
///
/// # Returns
/// A `Result` containing the initial integer value wrapped in `CodexOk`.
/// Performs a transformation step on the provided value.
///
/// # Arguments
/// * `val` - The input integer to be processed.
///
/// # Returns
/// A `Result` containing the doubled integer value wrapped in `CodexOk`.
/// Demonstrates sequential error handling using the `?` operator.
///
/// This function showcases how the `CodexResult` framework seamlessly integrates
/// with Rust's standard error propagation mechanism.
///
/// # Returns
/// `Ok(())` if the chain completes, or an error if any step fails.