pub enum TrailingStopError {
InvalidOrderType(OrderType),
UnsupportedTriggerType(TriggerType),
UnsupportedOffsetType(TrailingOffsetType),
MissingBid,
MissingAsk,
MissingLast,
InvalidPrice(Box<CorrectnessError>),
}Expand description
An error calculating a trailing stop order’s trigger or limit price.
Variants§
InvalidOrderType(OrderType)
The order is neither a trailing stop market order nor a trailing stop limit order.
UnsupportedTriggerType(TriggerType)
The trigger type has no supported market-price basis.
UnsupportedOffsetType(TrailingOffsetType)
The offset type has no supported price calculation.
MissingBid
A Default, BidAsk, or LastOrBidAsk calculation has no bid price.
MissingAsk
A Default, BidAsk, or LastOrBidAsk calculation has no ask price.
MissingLast
A LastPrice, MarkPrice, or LastOrBidAsk calculation has no last price.
InvalidPrice(Box<CorrectnessError>)
A calculated price fails validation, with a boxed [CorrectnessError] as its source.
Trait Implementations§
Source§impl Debug for TrailingStopError
impl Debug for TrailingStopError
Source§impl Display for TrailingStopError
impl Display for TrailingStopError
impl Eq for TrailingStopError
Source§impl Error for TrailingStopError
impl Error for TrailingStopError
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 TrailingStopError
impl From<CorrectnessError> for TrailingStopError
Source§impl PartialEq for TrailingStopError
impl PartialEq for TrailingStopError
impl StructuralPartialEq for TrailingStopError
Auto Trait Implementations§
impl Freeze for TrailingStopError
impl RefUnwindSafe for TrailingStopError
impl Send for TrailingStopError
impl Sync for TrailingStopError
impl Unpin for TrailingStopError
impl UnsafeUnpin for TrailingStopError
impl UnwindSafe for TrailingStopError
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