pub struct QueueEntry { /* private fields */ }Expand description
Represents a time priority queue entry
Time priority rules:
- The order with the smaller sequence number is higher priority
- If the sequence numbers are the same, limit orders are higher priority than pegged orders
- If the pegged orders have the same sequence number, the order with the smaller order ID is higher priority
Implementations§
Source§impl QueueEntry
impl QueueEntry
Sourcepub fn new(time_priority: SequenceNumber, order_id: OrderId) -> Self
pub fn new(time_priority: SequenceNumber, order_id: OrderId) -> Self
Create a new queue entry
Sourcepub fn time_priority(&self) -> SequenceNumber
pub fn time_priority(&self) -> SequenceNumber
Get the time priority of the order
Trait Implementations§
Source§impl Clone for QueueEntry
impl Clone for QueueEntry
Source§fn clone(&self) -> QueueEntry
fn clone(&self) -> QueueEntry
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 QueueEntry
impl Debug for QueueEntry
Source§impl<'de> Deserialize<'de> for QueueEntry
impl<'de> Deserialize<'de> for QueueEntry
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 Ord for QueueEntry
impl Ord for QueueEntry
Source§fn cmp(&self, other: &QueueEntry) -> Ordering
fn cmp(&self, other: &QueueEntry) -> 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 QueueEntry
impl PartialEq for QueueEntry
Source§impl PartialOrd for QueueEntry
impl PartialOrd for QueueEntry
Source§impl Serialize for QueueEntry
impl Serialize for QueueEntry
impl Copy for QueueEntry
impl Eq for QueueEntry
impl StructuralPartialEq for QueueEntry
Auto Trait Implementations§
impl Freeze for QueueEntry
impl RefUnwindSafe for QueueEntry
impl Send for QueueEntry
impl Sync for QueueEntry
impl Unpin for QueueEntry
impl UnsafeUnpin for QueueEntry
impl UnwindSafe for QueueEntry
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