optionstratlib_simulation/error/mod.rs
1//! Errors owned by the simulation layer.
2//!
3//! Each failure here is raised while generating a walk, validating its
4//! parameters or stepping through it. Errors of the layers below
5//! (`DecimalError`, `OptionsError`, `PricingError`, `VolatilityError`, …)
6//! stay with core and pricing, and the variants below that wrap them carry
7//! those types unchanged.
8//!
9//! # Canonical paths (#550)
10//!
11//! Every error type is exported flat from this module, for example
12//! `optionstratlib_simulation::error::SimulationError`. The file module
13//! `simulation` is private: it held nothing the flat paths do not, and was
14//! public only because 0.21 exposed it.
15//!
16//! ```rust
17//! use optionstratlib_simulation::error::{SimulationError, SimulationResult};
18//! ```
19//!
20//! ```compile_fail,E0603
21//! use optionstratlib_simulation::error::simulation::SimulationError;
22//! ```
23//!
24//! ```compile_fail,E0603
25//! use optionstratlib_simulation::error::simulation::SimulationResult;
26//! ```
27
28/// ### Simulation Errors (`SimulationError`)
29/// Handles:
30/// * Random walk generation failures
31/// * Monte Carlo simulation errors
32/// * Stochastic process parameter validation
33/// * Step calculation issues
34mod simulation;
35
36pub use simulation::{SimulationError, SimulationResult};