#[repr(i32)]pub enum ProtoOaOrderTriggerMethod {
Trade = 1,
Opposite = 2,
DoubleTrade = 3,
DoubleOpposite = 4,
}Expand description
- Stop Order and Stop Loss triggering method ENUM.
Variants§
Trade = 1
Stop Order: buy is triggered by ask, sell by bid; Stop Loss Order: for buy position is triggered by bid and for sell position by ask.
Opposite = 2
Stop Order: buy is triggered by bid, sell by ask; Stop Loss Order: for buy position is triggered by ask and for sell position by bid.
DoubleTrade = 3
The same as TRADE, but trigger is checked after the second consecutive tick.
DoubleOpposite = 4
The same as OPPOSITE, but trigger is checked after the second consecutive tick.
Implementations§
Source§impl ProtoOaOrderTriggerMethod
impl ProtoOaOrderTriggerMethod
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true if value is a variant of ProtoOaOrderTriggerMethod.
Sourcepub fn from_i32(value: i32) -> Option<ProtoOaOrderTriggerMethod>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<ProtoOaOrderTriggerMethod>
Converts an i32 to a ProtoOaOrderTriggerMethod, or None if value is not a valid variant.
Source§impl ProtoOaOrderTriggerMethod
impl ProtoOaOrderTriggerMethod
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for ProtoOaOrderTriggerMethod
impl Clone for ProtoOaOrderTriggerMethod
Source§fn clone(&self) -> ProtoOaOrderTriggerMethod
fn clone(&self) -> ProtoOaOrderTriggerMethod
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtoOaOrderTriggerMethod
impl Debug for ProtoOaOrderTriggerMethod
Source§impl Default for ProtoOaOrderTriggerMethod
impl Default for ProtoOaOrderTriggerMethod
Source§fn default() -> ProtoOaOrderTriggerMethod
fn default() -> ProtoOaOrderTriggerMethod
Source§impl<'de> Deserialize<'de> for ProtoOaOrderTriggerMethod
impl<'de> Deserialize<'de> for ProtoOaOrderTriggerMethod
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<ProtoOaOrderTriggerMethod> for i32
impl From<ProtoOaOrderTriggerMethod> for i32
Source§fn from(value: ProtoOaOrderTriggerMethod) -> i32
fn from(value: ProtoOaOrderTriggerMethod) -> i32
Source§impl Hash for ProtoOaOrderTriggerMethod
impl Hash for ProtoOaOrderTriggerMethod
Source§impl Ord for ProtoOaOrderTriggerMethod
impl Ord for ProtoOaOrderTriggerMethod
Source§fn cmp(&self, other: &ProtoOaOrderTriggerMethod) -> Ordering
fn cmp(&self, other: &ProtoOaOrderTriggerMethod) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for ProtoOaOrderTriggerMethod
impl PartialOrd for ProtoOaOrderTriggerMethod
Source§impl TryFrom<i32> for ProtoOaOrderTriggerMethod
impl TryFrom<i32> for ProtoOaOrderTriggerMethod
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<ProtoOaOrderTriggerMethod, UnknownEnumValue>
fn try_from(value: i32) -> Result<ProtoOaOrderTriggerMethod, UnknownEnumValue>
impl Copy for ProtoOaOrderTriggerMethod
impl Eq for ProtoOaOrderTriggerMethod
impl StructuralPartialEq for ProtoOaOrderTriggerMethod
Auto Trait Implementations§
impl Freeze for ProtoOaOrderTriggerMethod
impl RefUnwindSafe for ProtoOaOrderTriggerMethod
impl Send for ProtoOaOrderTriggerMethod
impl Sync for ProtoOaOrderTriggerMethod
impl Unpin for ProtoOaOrderTriggerMethod
impl UnwindSafe for ProtoOaOrderTriggerMethod
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.