#[repr(u8)]pub enum TimeInForce {
Gtc,
Ioc,
Fok,
Gtd(u64),
Day,
}Expand description
Specifies how long an order remains active before it is executed or expires.
Variants§
Gtc
Good ’Til Canceled - The order remains active until it is filled or canceled.
Ioc
Immediate Or Cancel - The order must be filled immediately in its entirety. If the order cannot be filled completely, the unfilled portion is canceled.
Fok
Fill Or Kill - The order must be filled immediately and completely. If the order cannot be filled entirely, the entire order is canceled.
Gtd(u64)
Good ’Til Date - The order remains active until a specified date and time, expressed as a Unix timestamp (seconds since epoch).
Day
Good for the trading Day - The order remains active until the end of the current trading day.
Implementations§
Source§impl TimeInForce
impl TimeInForce
Sourcepub fn is_immediate(&self) -> bool
pub fn is_immediate(&self) -> bool
Returns true if the order should be canceled after attempting to match
Sourcepub fn has_expiry(&self) -> bool
pub fn has_expiry(&self) -> bool
Returns true if the order has a specific expiration time
Trait Implementations§
Source§impl Clone for TimeInForce
impl Clone for TimeInForce
Source§fn clone(&self) -> TimeInForce
fn clone(&self) -> TimeInForce
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TimeInForce
Source§impl Debug for TimeInForce
impl Debug for TimeInForce
Source§impl<'de> Deserialize<'de> for TimeInForce
impl<'de> Deserialize<'de> for TimeInForce
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeInForce, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<TimeInForce, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for TimeInForce
impl Display for TimeInForce
impl Eq for TimeInForce
Source§impl FromStr for TimeInForce
impl FromStr for TimeInForce
Source§type Err = PriceLevelError
type Err = PriceLevelError
Source§fn from_str(s: &str) -> Result<TimeInForce, <TimeInForce as FromStr>::Err>
fn from_str(s: &str) -> Result<TimeInForce, <TimeInForce as FromStr>::Err>
s to return a value of this type. Read moreSource§impl PartialEq for TimeInForce
impl PartialEq for TimeInForce
Source§fn eq(&self, other: &TimeInForce) -> bool
fn eq(&self, other: &TimeInForce) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for TimeInForce
impl Serialize for TimeInForce
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for TimeInForce
Auto Trait Implementations§
impl Freeze for TimeInForce
impl RefUnwindSafe for TimeInForce
impl Send for TimeInForce
impl Sync for TimeInForce
impl Unpin for TimeInForce
impl UnsafeUnpin for TimeInForce
impl UnwindSafe for TimeInForce
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more