pub enum InstrumentSizingError {
Show 15 variants
Sizing(SizingError),
UnsupportedInstrumentSizing {
quantity_unit: QuantityUnit,
pnl_model: EconomicsModelId,
},
MissingNativeToAccountRate,
InvalidNativeToAccountRate {
value: f64,
},
ExactDecimalOutOfRange {
field: &'static str,
value: Decimal,
},
UnsupportedQuantityGridOrigin {
value: Decimal,
},
QuantityBoundOffGrid {
field: &'static str,
value: Decimal,
},
InvalidQuantityBounds {
minimum: Decimal,
maximum: Decimal,
},
QuantityStepOverflow {
field: &'static str,
value: Decimal,
},
InvalidQuantityGrid(GridError),
PriceOffGrid {
field: &'static str,
value: Decimal,
},
UnsupportedNotionalAsset {
notional_asset: AssetId,
settlement_asset: AssetId,
},
BelowMinimumNotional {
notional: Decimal,
minimum: Decimal,
},
AboveMaximumNotional {
notional: Decimal,
maximum: Decimal,
},
ExactArithmetic(DecimalError),
}Expand description
Catalog-backed sizing failures.
Variants§
Sizing(SizingError)
Existing policy, price, or floating-point sizing validation failed.
UnsupportedInstrumentSizing
The instrument quantity and P&L model combination is not supported by this sizing path.
Fields
quantity_unit: QuantityUnitInstrument quantity unit.
pnl_model: EconomicsModelIdInstrument P&L model.
MissingNativeToAccountRate
Catalog-backed monetary sizing did not receive a native-to-account conversion rate.
InvalidNativeToAccountRate
The supplied native-to-account conversion rate is not usable.
ExactDecimalOutOfRange
The exact instrument decimal cannot be represented as a finite f64.
Fields
UnsupportedQuantityGridOrigin
The quantity grid origin is incompatible with the retained zero-based lot-step result.
QuantityBoundOffGrid
An exact quantity bound is not on the declared quantity grid.
InvalidQuantityBounds
The exact quantity bounds are inconsistent.
Fields
QuantityStepOverflow
An exact quantity bound cannot be represented as a supported lot-step count.
InvalidQuantityGrid(GridError)
Exact quantity-grid arithmetic failed.
PriceOffGrid
A replay price is outside the declared price grid.
UnsupportedNotionalAsset
The notional asset is unsupported by the current quote-linear sizing model.
Fields
BelowMinimumNotional
Exact final notional is below the declared minimum.
AboveMaximumNotional
Exact final notional exceeds the declared maximum.
ExactArithmetic(DecimalError)
Exact catalog arithmetic failed.
Trait Implementations§
Source§impl Clone for InstrumentSizingError
impl Clone for InstrumentSizingError
Source§fn clone(&self) -> InstrumentSizingError
fn clone(&self) -> InstrumentSizingError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for InstrumentSizingError
impl Debug for InstrumentSizingError
Source§impl Display for InstrumentSizingError
impl Display for InstrumentSizingError
Source§impl Error for InstrumentSizingError
impl Error for InstrumentSizingError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()