pub enum TickSchemeError {
Show 16 variants
TickNotPositive {
tick: Price,
},
EmptyTiers,
TierValuesNaN {
index: usize,
start: f64,
stop: f64,
step: f64,
},
TierStartNotLessThanStop {
index: usize,
start: f64,
stop: f64,
},
TierStepNotPositive {
index: usize,
step: f64,
},
TierStepNotLessThanRange {
index: usize,
start: f64,
stop: f64,
step: f64,
range: f64,
},
TierOverlapsPrevious {
index: usize,
start: f64,
prev_stop: f64,
},
TierStartOutsidePriceRange {
index: usize,
start: f64,
},
TierStopOutsidePriceRange {
index: usize,
stop: f64,
},
InvalidPrecision {
source: CorrectnessError,
},
TickNotRepresentable {
tick: Price,
precision: u8,
},
InvalidName {
source: CorrectnessError,
},
DuplicateName {
name: String,
},
EmptyTickExpansion,
ExpandedTickOutsidePriceRange {
value: f64,
},
UnknownName {
name: String,
},
}Expand description
Error returned when tick scheme construction or parsing fails.
Variants§
TickNotPositive
A fixed tick size was not positive.
EmptyTiers
No tier definitions were supplied.
TierValuesNaN
A tier contained a NaN value.
Fields
TierStartNotLessThanStop
A tier start was not less than its stop.
Fields
TierStepNotPositive
A tier step was not positive.
TierStepNotLessThanRange
A finite tier step was not smaller than the tier range.
Fields
TierOverlapsPrevious
A tier overlaps the previous tier.
Fields
TierStartOutsidePriceRange
A tier start was outside the representable price range.
TierStopOutsidePriceRange
A tier stop was outside the representable price range.
InvalidPrecision
The requested price precision is invalid.
Fields
source: CorrectnessErrorThe source correctness error.
TickNotRepresentable
The fixed tick cannot be represented at the requested precision.
InvalidName
A tick scheme name was invalid.
Fields
source: CorrectnessErrorThe source correctness error.
DuplicateName
A tick scheme name was already registered.
EmptyTickExpansion
Tier expansion produced no ticks.
ExpandedTickOutsidePriceRange
An expanded tick value was outside the representable price range.
UnknownName
The requested tick scheme name is not registered.
Trait Implementations§
Source§impl Clone for TickSchemeError
impl Clone for TickSchemeError
Source§impl Debug for TickSchemeError
impl Debug for TickSchemeError
Source§impl Display for TickSchemeError
impl Display for TickSchemeError
Source§impl Error for TickSchemeError
impl Error for TickSchemeError
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()