pub enum PegReference {
Primary,
Market,
MidPrice,
}Expand description
Reference price type for pegged orders
Variants§
Primary
Pegged to the primary price (same side best price)
Market
Pegged to the market price (opposite side best price)
MidPrice
Pegged to the mid price between the best bid and the best ask
Implementations§
Source§impl PegReference
impl PegReference
Sourcepub const fn is_always_taker(self) -> bool
pub const fn is_always_taker(self) -> bool
Whether the peg reference is always a taker
Sourcepub const fn is_always_maker(self) -> bool
pub const fn is_always_maker(self) -> bool
Whether the peg reference is always a maker
Trait Implementations§
Source§impl Clone for PegReference
impl Clone for PegReference
Source§fn clone(&self) -> PegReference
fn clone(&self) -> PegReference
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 PegReference
impl Debug for PegReference
Source§impl<'de> Deserialize<'de> for PegReference
impl<'de> Deserialize<'de> for PegReference
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 Display for PegReference
impl Display for PegReference
Source§impl PartialEq for PegReference
impl PartialEq for PegReference
Source§impl Serialize for PegReference
impl Serialize for PegReference
impl Copy for PegReference
impl Eq for PegReference
impl StructuralPartialEq for PegReference
Auto Trait Implementations§
impl Freeze for PegReference
impl RefUnwindSafe for PegReference
impl Send for PegReference
impl Sync for PegReference
impl Unpin for PegReference
impl UnsafeUnpin for PegReference
impl UnwindSafe for PegReference
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