#[non_exhaustive]pub enum ProductClass {
EventContract,
PerpetualFuture,
Spot,
}Expand description
What a product trades, which fixes what its shared records mean.
A product declares its class as KeySpace::CLASS, and every key it makes
carries it, so MarketKey::class answers without a request. A class is
added only when a product of that class lands.
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.
EventContract
Contracts on an event’s outcomes. A key names one outcome, a price lies between 0 and 1, and a share pays one unit of the settlement currency when its outcome happens, so a position’s size is never negative.
PerpetualFuture
Perpetual futures. A price is unbounded, a position’s size is signed, and holders pay or receive funding.
Spot
Buying and selling the asset itself. A price is unbounded, a position is a balance of the base asset and so never negative, and there is no funding.
Implementations§
Trait Implementations§
Source§impl Clone for ProductClass
impl Clone for ProductClass
impl Copy for ProductClass
Source§impl Debug for ProductClass
impl Debug for ProductClass
Source§impl Display for ProductClass
impl Display for ProductClass
impl Eq for ProductClass
Source§impl Hash for ProductClass
impl Hash for ProductClass
Source§impl Ord for ProductClass
impl Ord for ProductClass
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ProductClass
impl PartialEq for ProductClass
Source§impl PartialOrd for ProductClass
impl PartialOrd for ProductClass
impl StructuralPartialEq for ProductClass
Auto Trait Implementations§
impl Freeze for ProductClass
impl RefUnwindSafe for ProductClass
impl Send for ProductClass
impl Sync for ProductClass
impl Unpin for ProductClass
impl UnsafeUnpin for ProductClass
impl UnwindSafe for ProductClass
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