#[non_exhaustive]pub enum MarketKind {
Spot,
Derivative(DerivativeKind),
}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.
Spot
Derivative(DerivativeKind)
Implementations§
Source§impl MarketKind
impl MarketKind
pub const fn spot() -> Self
pub const fn derivative(kind: DerivativeKind) -> Self
pub const fn linear_perpetual() -> Self
pub const fn inverse_perpetual() -> Self
pub const fn linear_expiring() -> Self
pub const fn inverse_expiring() -> Self
pub fn family(self) -> MarketFamily
pub fn is_derivative(self) -> bool
pub fn derivative_kind(self) -> Option<DerivativeKind>
Trait Implementations§
Source§impl Clone for MarketKind
impl Clone for MarketKind
Source§fn clone(&self) -> MarketKind
fn clone(&self) -> MarketKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MarketKind
impl Debug for MarketKind
Source§impl Display for MarketKind
impl Display for MarketKind
Source§impl FromStr for MarketKind
impl FromStr for MarketKind
Source§impl Hash for MarketKind
impl Hash for MarketKind
Source§impl Ord for MarketKind
impl Ord for MarketKind
Source§fn cmp(&self, other: &MarketKind) -> Ordering
fn cmp(&self, other: &MarketKind) -> Ordering
1.21.0 (const: unstable) · 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 MarketKind
impl PartialEq for MarketKind
Source§fn eq(&self, other: &MarketKind) -> bool
fn eq(&self, other: &MarketKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MarketKind
impl PartialOrd for MarketKind
impl Copy for MarketKind
impl Eq for MarketKind
impl StructuralPartialEq for MarketKind
Auto Trait Implementations§
impl Freeze for MarketKind
impl RefUnwindSafe for MarketKind
impl Send for MarketKind
impl Sync for MarketKind
impl Unpin for MarketKind
impl UnsafeUnpin for MarketKind
impl UnwindSafe for MarketKind
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