Skip to main content

TradingCapability

Enum TradingCapability 

Source
#[repr(i32)]
pub enum TradingCapability {
Show 29 variants NaForex = 1, NaCrypto = 2, HkStocks = 3, HkStockOptions = 4, HkIndexOptions = 5, HkFutures = 6, HkMutualFunds = 7, HkBonds = 8, HkStructureNotes = 9, UsStocks = 10, UsStockOptions = 11, UsIndexOptions = 12, UsFuturesOptions = 13, UsFutures = 14, CnStocks = 15, SgStocks = 16, SgFutures = 17, SgMutualFunds = 18, SgBonds = 19, SgStuctureNotes = 20, AuStocks = 21, JpStocks = 22, JpFutures = 23, MyStocks = 24, MyFutures = 25, CaStocks = 26, NaMutualFunds = 27, JpStockOptions = 28, JpIndexOptions = 29,
}
Expand description

Variants§

§

NaForex = 1

外汇(无市场概念)

§

NaCrypto = 2

数字货币(无市场概念)

§

HkStocks = 3

正股(香港市场)

§

HkStockOptions = 4

股票期权(香港市场)

§

HkIndexOptions = 5

指数期权(香港市场)

§

HkFutures = 6

期货(香港市场)

§

HkMutualFunds = 7

已废弃,原本含义基金(香港市场),现在判断基金交易能力使用NA_MUTUAL_FUNDS

§

HkBonds = 8

债券(香港市场)

§

HkStructureNotes = 9

结构化票据(香港市场)

§

UsStocks = 10

正股(美国市场)

§

UsStockOptions = 11

股票期权(美国市场)

§

UsIndexOptions = 12

指数期权(美国市场)

§

UsFuturesOptions = 13

期货期权(美国市场)

§

UsFutures = 14

期货(美国市场)

§

CnStocks = 15

正股(大陆市场)

§

SgStocks = 16

正股(新加坡市场)

§

SgFutures = 17

期货(新加坡市场)

§

SgMutualFunds = 18

已废弃,原本含义基金(香港市场),现在判断基金交易能力使用NA_MUTUAL_FUNDS

§

SgBonds = 19

债券(新加坡市场)

§

SgStuctureNotes = 20

结构化票据(新加坡市场)

§

AuStocks = 21

正股(澳洲市场)

§

JpStocks = 22

正股(日本市场)

§

JpFutures = 23

期货(日本市场)

§

MyStocks = 24

正股(马来西亚市场)

§

MyFutures = 25

期货(马来西亚市场)

§

CaStocks = 26

正股(加拿大市场)

§

NaMutualFunds = 27

基金(无市场概念)

§

JpStockOptions = 28

该字段之前是MY_MUTUAL_FUNDS,特指MY市场基金,目前除了MY之外, 其他支持Trading Capability的主体,都还不支持基金能力,所以计划 把基金的交易能力统一收拢在该字段,対该字段重命名

股票期权(日本市场)

§

JpIndexOptions = 29

指数期权(日本市场)

Implementations§

Source§

impl TradingCapability

Source

pub fn is_valid(value: i32) -> bool

Returns true if value is a variant of TradingCapability.

Source

pub fn from_i32(value: i32) -> Option<TradingCapability>

👎Deprecated: Use the TryFrom<i32> implementation instead

Converts an i32 to a TradingCapability, or None if value is not a valid variant.

Source§

impl TradingCapability

Source

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.

Source

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 TradingCapability

Source§

fn clone(&self) -> TradingCapability

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TradingCapability

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for TradingCapability

Source§

fn default() -> TradingCapability

Returns the “default value” for a type. Read more
Source§

impl From<TradingCapability> for i32

Source§

fn from(value: TradingCapability) -> i32

Converts to this type from the input type.
Source§

impl Hash for TradingCapability

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for TradingCapability

Source§

fn cmp(&self, other: &TradingCapability) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for TradingCapability

Source§

fn eq(&self, other: &TradingCapability) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for TradingCapability

Source§

fn partial_cmp(&self, other: &TradingCapability) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<i32> for TradingCapability

Source§

type Error = UnknownEnumValue

The type returned in the event of a conversion error.
Source§

fn try_from(value: i32) -> Result<TradingCapability, UnknownEnumValue>

Performs the conversion.
Source§

impl Copy for TradingCapability

Source§

impl Eq for TradingCapability

Source§

impl StructuralPartialEq for TradingCapability

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more