#[repr(i32)]pub enum OptionStrategyType {
Show 14 variants
Unknown = 0,
SingleOption = 1,
Covered = 2,
Spread = 4,
Straddle = 6,
Strangle = 7,
Collar = 8,
Butterfly = 9,
Condor = 11,
IronButterfly = 13,
IronCondor = 14,
CalendarSpread = 15,
DiagonalSpread = 16,
Customize = 100,
}Variants§
Unknown = 0
未知
SingleOption = 1
单个期权
Covered = 2
股票担保
Spread = 4
垂直策略
Straddle = 6
跨式策略
Strangle = 7
宽跨式策略
Collar = 8
领式策略
Butterfly = 9
蝶式策略
Condor = 11
鹰式策略
IronButterfly = 13
铁蝶式策略
IronCondor = 14
铁鹰式策略
CalendarSpread = 15
日历策略
DiagonalSpread = 16
对角策略
Customize = 100
自定义策略
Implementations§
Source§impl OptionStrategyType
impl OptionStrategyType
Sourcepub fn from_i32(value: i32) -> Option<OptionStrategyType>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<OptionStrategyType>
Use the TryFrom<i32> implementation instead
Converts an i32 to a OptionStrategyType, or None if value is not a valid variant.
Source§impl OptionStrategyType
impl OptionStrategyType
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 OptionStrategyType
impl Clone for OptionStrategyType
Source§fn clone(&self) -> OptionStrategyType
fn clone(&self) -> OptionStrategyType
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 OptionStrategyType
impl Debug for OptionStrategyType
Source§impl Default for OptionStrategyType
impl Default for OptionStrategyType
Source§fn default() -> OptionStrategyType
fn default() -> OptionStrategyType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OptionStrategyType
impl<'de> Deserialize<'de> for OptionStrategyType
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<OptionStrategyType> for i32
impl From<OptionStrategyType> for i32
Source§fn from(value: OptionStrategyType) -> i32
fn from(value: OptionStrategyType) -> i32
Converts to this type from the input type.
Source§impl Hash for OptionStrategyType
impl Hash for OptionStrategyType
Source§impl Ord for OptionStrategyType
impl Ord for OptionStrategyType
Source§fn cmp(&self, other: &OptionStrategyType) -> Ordering
fn cmp(&self, other: &OptionStrategyType) -> 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 OptionStrategyType
impl PartialEq for OptionStrategyType
Source§impl PartialOrd for OptionStrategyType
impl PartialOrd for OptionStrategyType
Source§impl Serialize for OptionStrategyType
impl Serialize for OptionStrategyType
Source§impl TryFrom<i32> for OptionStrategyType
impl TryFrom<i32> for OptionStrategyType
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<OptionStrategyType, UnknownEnumValue>
fn try_from(value: i32) -> Result<OptionStrategyType, UnknownEnumValue>
Performs the conversion.
impl Copy for OptionStrategyType
impl Eq for OptionStrategyType
impl StructuralPartialEq for OptionStrategyType
Auto Trait Implementations§
impl Freeze for OptionStrategyType
impl RefUnwindSafe for OptionStrategyType
impl Send for OptionStrategyType
impl Sync for OptionStrategyType
impl Unpin for OptionStrategyType
impl UnsafeUnpin for OptionStrategyType
impl UnwindSafe for OptionStrategyType
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