pub enum ProtectionPriceError {
InvalidOrderType(OrderType),
MissingBid,
MissingAsk,
OffsetOverflow,
PriceOverflow,
InvalidPrice(Box<CorrectnessError>),
}Expand description
An error calculating a market or stop market order’s protection price.
Variants§
InvalidOrderType(OrderType)
The order is neither a market order nor a stop market order.
MissingBid
A sell order has no bid price.
MissingAsk
A buy order has no ask price.
OffsetOverflow
Multiplying the price increment by the protection points overflows.
PriceOverflow
Applying the protection offset to the quote overflows.
InvalidPrice(Box<CorrectnessError>)
The raw price or precision fails validation, with a boxed [CorrectnessError] as its source.
Trait Implementations§
Source§impl Debug for ProtectionPriceError
impl Debug for ProtectionPriceError
Source§impl Display for ProtectionPriceError
impl Display for ProtectionPriceError
impl Eq for ProtectionPriceError
Source§impl Error for ProtectionPriceError
impl Error for ProtectionPriceError
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 From<CorrectnessError> for ProtectionPriceError
impl From<CorrectnessError> for ProtectionPriceError
Source§impl PartialEq for ProtectionPriceError
impl PartialEq for ProtectionPriceError
impl StructuralPartialEq for ProtectionPriceError
Auto Trait Implementations§
impl Freeze for ProtectionPriceError
impl RefUnwindSafe for ProtectionPriceError
impl Send for ProtectionPriceError
impl Sync for ProtectionPriceError
impl Unpin for ProtectionPriceError
impl UnsafeUnpin for ProtectionPriceError
impl UnwindSafe for ProtectionPriceError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more