pub enum PositionSaveReason {
OpenMarket,
Update,
Crank,
ExecuteLimitOrder,
SetTrigger,
}
Expand description
Why was a position saved?
Variants§
OpenMarket
Newly opened position via market order
Update
Update to an existing position
Crank
The crank processed this position for liquifunding
ExecuteLimitOrder
A limit order was executed
SetTrigger
User attempted to set a trigger price on an existing position
Implementations§
source§impl PositionSaveReason
impl PositionSaveReason
sourcepub fn into_congestion_reason(self) -> Option<CongestionReason>
pub fn into_congestion_reason(self) -> Option<CongestionReason>
Get the CongestionReason for this value.
If this user action can result in a congestion error message, provide the CongestionReason value. If None, then this PositionSaveReason cannot be blocked because of congestion.
Trait Implementations§
source§impl Clone for PositionSaveReason
impl Clone for PositionSaveReason
source§fn clone(&self) -> PositionSaveReason
fn clone(&self) -> PositionSaveReason
Returns a copy of the value. Read more
1.0.0 · 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 PositionSaveReason
impl Debug for PositionSaveReason
source§impl PartialEq for PositionSaveReason
impl PartialEq for PositionSaveReason
source§fn eq(&self, other: &PositionSaveReason) -> bool
fn eq(&self, other: &PositionSaveReason) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PositionSaveReason
impl Eq for PositionSaveReason
impl StructuralPartialEq for PositionSaveReason
Auto Trait Implementations§
impl Freeze for PositionSaveReason
impl RefUnwindSafe for PositionSaveReason
impl Send for PositionSaveReason
impl Sync for PositionSaveReason
impl Unpin for PositionSaveReason
impl UnwindSafe for PositionSaveReason
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
Casts
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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
§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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more