pub struct RestingLimitOrder { /* private fields */ }Expand description
Represents a limit order resting in the order book
Implementations§
Source§impl RestingLimitOrder
impl RestingLimitOrder
Sourcepub fn new(
time_priority: SequenceNumber,
level_id: usize,
order: LimitOrder,
) -> Self
pub fn new( time_priority: SequenceNumber, level_id: usize, order: LimitOrder, ) -> Self
Create a new resting limit order
Sourcepub fn time_priority(&self) -> SequenceNumber
pub fn time_priority(&self) -> SequenceNumber
Get the time priority of the order
Sourcepub fn order(&self) -> &LimitOrder
pub fn order(&self) -> &LimitOrder
Get the limit order
Methods from Deref<Target = LimitOrder>§
Sourcepub fn validate(&self) -> Result<(), CommandError>
pub fn validate(&self) -> Result<(), CommandError>
Validate the order specification
Sourcepub fn quantity_policy(&self) -> QuantityPolicy
pub fn quantity_policy(&self) -> QuantityPolicy
Get the quantity policy
Sourcepub fn visible_quantity(&self) -> Quantity
pub fn visible_quantity(&self) -> Quantity
Get the visible quantity
Get the hidden quantity
Sourcepub fn replenish_quantity(&self) -> Quantity
pub fn replenish_quantity(&self) -> Quantity
Get the replenish quantity
Sourcepub fn total_quantity(&self) -> Quantity
pub fn total_quantity(&self) -> Quantity
Get the total quantity of the order
Sourcepub fn flags(&self) -> &OrderFlags
pub fn flags(&self) -> &OrderFlags
Get the flags of the order
Methods from Deref<Target = OrderFlags>§
Sourcepub fn time_in_force(&self) -> TimeInForce
pub fn time_in_force(&self) -> TimeInForce
Get the time in force
Sourcepub fn is_immediate(&self) -> bool
pub fn is_immediate(&self) -> bool
Check if the order should be canceled after attempting to match
Sourcepub fn has_expiry(&self) -> bool
pub fn has_expiry(&self) -> bool
Check if the order has an expiry time
Sourcepub fn expires_at(&self) -> Option<Timestamp>
pub fn expires_at(&self) -> Option<Timestamp>
Get the timestamp when the order expires, if any
Sourcepub fn is_expired(&self, timestamp: Timestamp) -> bool
pub fn is_expired(&self, timestamp: Timestamp) -> bool
Check if the order is expired at a given timestamp
Trait Implementations§
Source§impl Clone for RestingLimitOrder
impl Clone for RestingLimitOrder
Source§fn clone(&self) -> RestingLimitOrder
fn clone(&self) -> RestingLimitOrder
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 RestingLimitOrder
impl Debug for RestingLimitOrder
Source§impl Deref for RestingLimitOrder
impl Deref for RestingLimitOrder
Source§impl DerefMut for RestingLimitOrder
impl DerefMut for RestingLimitOrder
Source§impl<'de> Deserialize<'de> for RestingLimitOrder
impl<'de> Deserialize<'de> for RestingLimitOrder
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 PartialEq for RestingLimitOrder
impl PartialEq for RestingLimitOrder
Source§impl Serialize for RestingLimitOrder
impl Serialize for RestingLimitOrder
impl Eq for RestingLimitOrder
impl StructuralPartialEq for RestingLimitOrder
Auto Trait Implementations§
impl Freeze for RestingLimitOrder
impl RefUnwindSafe for RestingLimitOrder
impl Send for RestingLimitOrder
impl Sync for RestingLimitOrder
impl Unpin for RestingLimitOrder
impl UnsafeUnpin for RestingLimitOrder
impl UnwindSafe for RestingLimitOrder
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