Expand description
Errors raised by the core domain types. Errors owned by the core layer.
Each file here belongs to optionstratlib-core because the failure it
describes is raised by a core type: a decimal operation, an option
contract, a position or a trade. Errors raised by higher layers (pricing,
market, analytics, strategies, …) live with those layers, so core never
names an error it cannot raise.
§Canonical paths (#550)
Every error type is exported flat from this module, for example
optionstratlib_core::error::DecimalError. The file modules decimal
and trade are private: they held nothing the flat paths do not, and
were public only because 0.21 exposed them. position stays public
because its detail enums (PositionValidationErrorKind, …) are not
flattened: kind names collide across crates once the facade gathers every
crate’s errors (see position’s module docs).
use optionstratlib_core::error::{DecimalError, DecimalResult, TradeError};use optionstratlib_core::error::decimal::DecimalError;use optionstratlib_core::error::decimal::DecimalResult;use optionstratlib_core::error::trade::TradeError;Re-exports§
pub use position::PositionError;
Modules§
- position
- Position Errors (
PositionError)
Enums§
- Decimal
Error - Decimal Error Management
- Operation
Error Kind - Represents the types of errors that can occur during operations related to trading strategies or other processes.
- Options
Error - Custom errors that can occur during Options operations
- Trade
Error - Represents errors that can occur during trade-related operations.
Type Aliases§
- Decimal
Result - A specialized
Resulttype for decimal calculation operations. - Options
Result - A specialized result type for operations related to Options calculations and processing.