Skip to main content

Module error

Module error 

Source
Expand description

Errors raised by the pricing layer. Errors owned by the pricing layer.

Each failure here is raised by a pricing model, a Greek or a volatility solver. Errors of the layers below (DecimalError, OptionsError, CurveError, …) stay with optionstratlib-core and optionstratlib-math, and the variants below that wrap them carry those types unchanged.

§Canonical paths (#550)

Every error type is exported flat from this module, for example optionstratlib_pricing::error::PricingError. The file module pricing is private: it held nothing the flat paths do not, and was public only because 0.21 exposed it. GreeksResult is flat too. greeks stays public because its detail enums (InputErrorKind, …) are not flattened: kind names collide across crates once the facade gathers every crate’s errors (see greeks’s module docs).

use optionstratlib_pricing::error::{GreeksError, GreeksResult, PricingError, PricingResult};
ⓘ
use optionstratlib_pricing::error::pricing::PricingError;
ⓘ
use optionstratlib_pricing::error::pricing::PricingResult;

Re-exports§

pub use greeks::GreeksError;
pub use greeks::GreeksResult;

Modules§

greeks
Greeks Errors (GreeksError)

Enums§

PricingError
Error type for option pricing operations.
VolatilityError
Represents errors that can occur during volatility-related calculations.

Type Aliases§

PricingResult
Type alias for Results that may return a PricingError.