pub struct OrderFlags { /* private fields */ }Expand description
Flags that are common to all order types
Implementations§
Source§impl OrderFlags
impl OrderFlags
Sourcepub fn new(side: Side, post_only: bool, time_in_force: TimeInForce) -> Self
pub fn new(side: Side, post_only: bool, time_in_force: TimeInForce) -> Self
Create a new order flags
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 OrderFlags
impl Clone for OrderFlags
Source§fn clone(&self) -> OrderFlags
fn clone(&self) -> OrderFlags
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 OrderFlags
impl Debug for OrderFlags
Source§impl<'de> Deserialize<'de> for OrderFlags
impl<'de> Deserialize<'de> for OrderFlags
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 OrderFlags
impl PartialEq for OrderFlags
Source§impl Serialize for OrderFlags
impl Serialize for OrderFlags
impl Eq for OrderFlags
impl StructuralPartialEq for OrderFlags
Auto Trait Implementations§
impl Freeze for OrderFlags
impl RefUnwindSafe for OrderFlags
impl Send for OrderFlags
impl Sync for OrderFlags
impl Unpin for OrderFlags
impl UnsafeUnpin for OrderFlags
impl UnwindSafe for OrderFlags
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