#[repr(i32)]pub enum SimAccType {
Unknown = 0,
Stock = 1,
Option = 2,
Futures = 3,
StockAndOption = 4,
}Expand description
模拟交易账户类型
Variants§
Unknown = 0
未知
Stock = 1
股票模拟账户(仅用于交易证券类产品,不支持交易期权)
Option = 2
期权模拟账户(仅用于交易期权,不支持交易股票证券类产品)
Futures = 3
期货模拟账户
StockAndOption = 4
股票和期权模拟账户(支持交易股票和期权)
Implementations§
Source§impl SimAccType
impl SimAccType
Source§impl SimAccType
impl SimAccType
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 SimAccType
impl Clone for SimAccType
Source§fn clone(&self) -> SimAccType
fn clone(&self) -> SimAccType
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 SimAccType
impl Debug for SimAccType
Source§impl Default for SimAccType
impl Default for SimAccType
Source§fn default() -> SimAccType
fn default() -> SimAccType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SimAccType
impl<'de> Deserialize<'de> for SimAccType
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<SimAccType> for i32
impl From<SimAccType> for i32
Source§fn from(value: SimAccType) -> i32
fn from(value: SimAccType) -> i32
Converts to this type from the input type.
Source§impl Hash for SimAccType
impl Hash for SimAccType
Source§impl Ord for SimAccType
impl Ord for SimAccType
Source§fn cmp(&self, other: &SimAccType) -> Ordering
fn cmp(&self, other: &SimAccType) -> 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 SimAccType
impl PartialEq for SimAccType
Source§impl PartialOrd for SimAccType
impl PartialOrd for SimAccType
Source§impl Serialize for SimAccType
impl Serialize for SimAccType
Source§impl TryFrom<i32> for SimAccType
impl TryFrom<i32> for SimAccType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<SimAccType, UnknownEnumValue>
fn try_from(value: i32) -> Result<SimAccType, UnknownEnumValue>
Performs the conversion.
impl Copy for SimAccType
impl Eq for SimAccType
impl StructuralPartialEq for SimAccType
Auto Trait Implementations§
impl Freeze for SimAccType
impl RefUnwindSafe for SimAccType
impl Send for SimAccType
impl Sync for SimAccType
impl Unpin for SimAccType
impl UnwindSafe for SimAccType
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