#[non_exhaustive]pub enum ContractType {
Perpetual,
TradifiPerpetual,
CurrentMonth,
NextMonth,
CurrentQuarter,
NextQuarter,
PerpetualDelivering,
Other(String),
}Expand description
A contract’s type, from exchangeInfo.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Perpetual
TradifiPerpetual
A perpetual on a traditional-finance underlying (equities, metals, FX).
CurrentMonth
NextMonth
CurrentQuarter
NextQuarter
PerpetualDelivering
Other(String)
A value this version of the SDK does not recognise, kept verbatim. Sending it in a request passes the string through unchanged.
Build it with from_wire or FromStr, never directly:
Other holding a known spelling serialises as the named variant
does, but does not compare equal to it.
Implementations§
Source§impl ContractType
impl ContractType
Trait Implementations§
Source§impl Clone for ContractType
impl Clone for ContractType
Source§impl Debug for ContractType
impl Debug for ContractType
Source§impl<'de> Deserialize<'de> for ContractType
impl<'de> Deserialize<'de> for ContractType
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for ContractType
impl Display for ContractType
impl Eq for ContractType
Source§impl FromStr for ContractType
impl FromStr for ContractType
Source§impl Hash for ContractType
impl Hash for ContractType
Source§impl PartialEq for ContractType
impl PartialEq for ContractType
Source§impl Serialize for ContractType
impl Serialize for ContractType
impl StructuralPartialEq for ContractType
Auto Trait Implementations§
impl Freeze for ContractType
impl RefUnwindSafe for ContractType
impl Send for ContractType
impl Sync for ContractType
impl Unpin for ContractType
impl UnsafeUnpin for ContractType
impl UnwindSafe for ContractType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.