pub enum TickSchemeError {
Show 14 variants
TickNotFinite {
tick: f64,
},
TickNotPositive {
tick: f64,
},
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,
},
EmptyTickExpansion,
ExpandedTickOutsidePriceRange {
value: f64,
},
UnknownName {
name: String,
},
}Expand description
Error returned when tick scheme construction or parsing fails.
Variants§
TickNotFinite
A fixed tick size was not finite.
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.
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§fn clone(&self) -> TickSchemeError
fn clone(&self) -> TickSchemeError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for TickSchemeError
impl PartialEq for TickSchemeError
Source§fn eq(&self, other: &TickSchemeError) -> bool
fn eq(&self, other: &TickSchemeError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TickSchemeError
Auto Trait Implementations§
impl Freeze for TickSchemeError
impl RefUnwindSafe for TickSchemeError
impl Send for TickSchemeError
impl Sync for TickSchemeError
impl Unpin for TickSchemeError
impl UnsafeUnpin for TickSchemeError
impl UnwindSafe for TickSchemeError
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more