#[repr(i32)]pub enum MarketCategory {
UsStock = 0,
UsIndex = 1,
UsFuture = 2,
HkStock = 3,
HkIndex = 4,
JpStock = 5,
JpIndex = 6,
}Expand description
期权市场品类 (枚举值与后台 FTCmdOptionMarket.MarketCategory 一致, 直接透传)
Variants§
UsStock = 0
美股股票期权
UsIndex = 1
美股指数期权
UsFuture = 2
美股期货期权
HkStock = 3
港股股票期权
HkIndex = 4
港股指数期权
JpStock = 5
日股股票期权
JpIndex = 6
日股指数期权
Implementations§
Source§impl MarketCategory
impl MarketCategory
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 MarketCategory
impl Clone for MarketCategory
Source§fn clone(&self) -> MarketCategory
fn clone(&self) -> MarketCategory
Returns a duplicate 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 MarketCategory
impl Debug for MarketCategory
Source§impl Default for MarketCategory
impl Default for MarketCategory
Source§fn default() -> MarketCategory
fn default() -> MarketCategory
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for MarketCategory
impl<'de> Deserialize<'de> for MarketCategory
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<MarketCategory> for i32
impl From<MarketCategory> for i32
Source§fn from(value: MarketCategory) -> i32
fn from(value: MarketCategory) -> i32
Converts to this type from the input type.
Source§impl Hash for MarketCategory
impl Hash for MarketCategory
Source§impl Ord for MarketCategory
impl Ord for MarketCategory
Source§fn cmp(&self, other: &MarketCategory) -> Ordering
fn cmp(&self, other: &MarketCategory) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MarketCategory
impl PartialEq for MarketCategory
Source§impl PartialOrd for MarketCategory
impl PartialOrd for MarketCategory
Source§impl Serialize for MarketCategory
impl Serialize for MarketCategory
Source§impl TryFrom<i32> for MarketCategory
impl TryFrom<i32> for MarketCategory
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<MarketCategory, UnknownEnumValue>
fn try_from(value: i32) -> Result<MarketCategory, UnknownEnumValue>
Performs the conversion.
impl Copy for MarketCategory
impl Eq for MarketCategory
impl StructuralPartialEq for MarketCategory
Auto Trait Implementations§
impl Freeze for MarketCategory
impl RefUnwindSafe for MarketCategory
impl Send for MarketCategory
impl Sync for MarketCategory
impl Unpin for MarketCategory
impl UnsafeUnpin for MarketCategory
impl UnwindSafe for MarketCategory
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