#[repr(i32)]pub enum TrdSide {
Unknown = 0,
Buy = 1,
Sell = 2,
SellShort = 3,
BuyBack = 4,
}Expand description
交易方向
Variants§
Unknown = 0
客户端下单只传Buy或Sell即可,SellShort是美股订单时服务器返回有此方向,BuyBack目前不存在,但也不排除服务器会传
未知方向
Buy = 1
买入
Sell = 2
卖出
SellShort = 3
卖空
BuyBack = 4
买回
Implementations§
Source§impl TrdSide
impl TrdSide
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<'de> Deserialize<'de> for TrdSide
impl<'de> Deserialize<'de> for TrdSide
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 Ord for TrdSide
impl Ord for TrdSide
Source§impl PartialOrd for TrdSide
impl PartialOrd for TrdSide
impl Copy for TrdSide
impl Eq for TrdSide
impl StructuralPartialEq for TrdSide
Auto Trait Implementations§
impl Freeze for TrdSide
impl RefUnwindSafe for TrdSide
impl Send for TrdSide
impl Sync for TrdSide
impl Unpin for TrdSide
impl UnwindSafe for TrdSide
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