#[repr(i32)]pub enum TriggerDirection {
TRIGGER_DIRECTION_UNSPECIFIED = 0,
ABOVE = 1,
BELOW = 2,
}Expand description
TriggerDirection defines whether the trigger fires when price goes above or below threshold.
Variants§
TRIGGER_DIRECTION_UNSPECIFIED = 0
Trigger direction was not provided.
ABOVE = 1
Fire when price >= trigger_price (e.g., take-profit for long, stop-loss for short).
BELOW = 2
Fire when price <= trigger_price (e.g., stop-loss for long, take-profit for short).
Implementations§
Source§impl TriggerDirection
impl TriggerDirection
Sourcepub const TriggerDirectionUnspecified: Self = Self::TRIGGER_DIRECTION_UNSPECIFIED
pub const TriggerDirectionUnspecified: Self = Self::TRIGGER_DIRECTION_UNSPECIFIED
Idiomatic alias for Self::TRIGGER_DIRECTION_UNSPECIFIED; Debug prints the variant name.
Sourcepub const Above: Self = Self::ABOVE
pub const Above: Self = Self::ABOVE
Idiomatic alias for Self::ABOVE; Debug prints the variant name.
Sourcepub const Below: Self = Self::BELOW
pub const Below: Self = Self::BELOW
Idiomatic alias for Self::BELOW; Debug prints the variant name.
Trait Implementations§
Source§impl Clone for TriggerDirection
impl Clone for TriggerDirection
Source§fn clone(&self) -> TriggerDirection
fn clone(&self) -> TriggerDirection
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 moreimpl Copy for TriggerDirection
Source§impl Debug for TriggerDirection
impl Debug for TriggerDirection
Source§impl Default for TriggerDirection
impl Default for TriggerDirection
Source§impl<'de> Deserialize<'de> for TriggerDirection
impl<'de> Deserialize<'de> for TriggerDirection
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Enumeration for TriggerDirection
impl Enumeration for TriggerDirection
Source§fn proto_name(&self) -> &'static str
fn proto_name(&self) -> &'static str
The name of this enum variant as it appears in the
.proto file.impl Eq for TriggerDirection
Source§impl Hash for TriggerDirection
impl Hash for TriggerDirection
Source§impl PartialEq for TriggerDirection
impl PartialEq for TriggerDirection
Source§impl ProtoElemJson for TriggerDirection
impl ProtoElemJson for TriggerDirection
Source§fn serialize_proto_json<S: Serializer>(
v: &Self,
s: S,
) -> Result<S::Ok, S::Error>
fn serialize_proto_json<S: Serializer>( v: &Self, s: S, ) -> Result<S::Ok, S::Error>
Serialize this value with proto3 JSON semantics.
Source§fn deserialize_proto_json<'de, D: Deserializer<'de>>(
d: D,
) -> Result<Self, D::Error>
fn deserialize_proto_json<'de, D: Deserializer<'de>>( d: D, ) -> Result<Self, D::Error>
Deserialize a value with proto3 JSON semantics.
Source§impl Serialize for TriggerDirection
impl Serialize for TriggerDirection
impl StructuralPartialEq for TriggerDirection
Auto Trait Implementations§
impl Freeze for TriggerDirection
impl RefUnwindSafe for TriggerDirection
impl Send for TriggerDirection
impl Sync for TriggerDirection
impl Unpin for TriggerDirection
impl UnsafeUnpin for TriggerDirection
impl UnwindSafe for TriggerDirection
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
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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§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
Compare self to
key and return true if they are equal.