#[repr(i32)]pub enum ProtoOaCommissionType {
UsdPerMillionUsd = 1,
UsdPerLot = 2,
PercentageOfValue = 3,
QuoteCcyPerLot = 4,
}Expand description
- Enum for specifying type of trading commission.
Variants§
UsdPerMillionUsd = 1
USD per million USD volume - usually used for FX. Example: 50 USD for 1 mil USD of trading volume.
UsdPerLot = 2
USD per 1 lot - usually used for CFDs and futures for commodities, and indices. Example: 15 USD for 1 contract.
PercentageOfValue = 3
Percentage of trading volume - usually used for Equities. Example: 0.005% of notional trading volume. Multiplied by 100,000.
QuoteCcyPerLot = 4
Quote ccy of Symbol per 1 lot - will be used for CFDs and futures for commodities, and indices. Example: 15 EUR for 1 contract of DAX.
Implementations§
Source§impl ProtoOaCommissionType
impl ProtoOaCommissionType
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true if value is a variant of ProtoOaCommissionType.
Sourcepub fn from_i32(value: i32) -> Option<ProtoOaCommissionType>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<ProtoOaCommissionType>
Converts an i32 to a ProtoOaCommissionType, or None if value is not a valid variant.
Source§impl ProtoOaCommissionType
impl ProtoOaCommissionType
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 ProtoOaCommissionType
impl Clone for ProtoOaCommissionType
Source§fn clone(&self) -> ProtoOaCommissionType
fn clone(&self) -> ProtoOaCommissionType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtoOaCommissionType
impl Debug for ProtoOaCommissionType
Source§impl Default for ProtoOaCommissionType
impl Default for ProtoOaCommissionType
Source§fn default() -> ProtoOaCommissionType
fn default() -> ProtoOaCommissionType
Source§impl<'de> Deserialize<'de> for ProtoOaCommissionType
impl<'de> Deserialize<'de> for ProtoOaCommissionType
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<ProtoOaCommissionType> for i32
impl From<ProtoOaCommissionType> for i32
Source§fn from(value: ProtoOaCommissionType) -> i32
fn from(value: ProtoOaCommissionType) -> i32
Source§impl Hash for ProtoOaCommissionType
impl Hash for ProtoOaCommissionType
Source§impl Ord for ProtoOaCommissionType
impl Ord for ProtoOaCommissionType
Source§fn cmp(&self, other: &ProtoOaCommissionType) -> Ordering
fn cmp(&self, other: &ProtoOaCommissionType) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ProtoOaCommissionType
impl PartialEq for ProtoOaCommissionType
Source§impl PartialOrd for ProtoOaCommissionType
impl PartialOrd for ProtoOaCommissionType
Source§impl Serialize for ProtoOaCommissionType
impl Serialize for ProtoOaCommissionType
Source§impl TryFrom<i32> for ProtoOaCommissionType
impl TryFrom<i32> for ProtoOaCommissionType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<ProtoOaCommissionType, UnknownEnumValue>
fn try_from(value: i32) -> Result<ProtoOaCommissionType, UnknownEnumValue>
impl Copy for ProtoOaCommissionType
impl Eq for ProtoOaCommissionType
impl StructuralPartialEq for ProtoOaCommissionType
Auto Trait Implementations§
impl Freeze for ProtoOaCommissionType
impl RefUnwindSafe for ProtoOaCommissionType
impl Send for ProtoOaCommissionType
impl Sync for ProtoOaCommissionType
impl Unpin for ProtoOaCommissionType
impl UnwindSafe for ProtoOaCommissionType
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.