Enum TimeInForce
#[repr(i32)]pub enum TimeInForce {
Unspecified = 0,
Ioc = 1,
PostOnly = 2,
FillOrKill = 3,
}Expand description
TimeInForce indicates how long an order will remain active before it is executed or expires.
Variants§
Unspecified = 0
TIME_IN_FORCE_UNSPECIFIED represents the default behavior where an order will first match with existing orders on the book, and any remaining size will be added to the book as a maker order.
Ioc = 1
TIME_IN_FORCE_IOC enforces that an order only be matched with maker orders on the book. If the order has remaining size after matching with existing orders on the book, the remaining size is not placed on the book.
PostOnly = 2
TIME_IN_FORCE_POST_ONLY enforces that an order only be placed on the book as a maker order. Note this means that validators will cancel any newly-placed post only orders that would cross with other maker orders.
FillOrKill = 3
TIME_IN_FORCE_FILL_OR_KILL has been deprecated and will be removed in future versions.
Implementations§
§impl TimeInForce
impl TimeInForce
§impl TimeInForce
impl TimeInForce
pub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn from_str_name(value: &str) -> Option<TimeInForce>
pub fn from_str_name(value: &str) -> Option<TimeInForce>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
§impl Clone for TimeInForce
impl Clone for TimeInForce
§fn clone(&self) -> TimeInForce
fn clone(&self) -> TimeInForce
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for TimeInForce
impl Debug for TimeInForce
§impl Default for TimeInForce
impl Default for TimeInForce
§fn default() -> TimeInForce
fn default() -> TimeInForce
§impl Hash for TimeInForce
impl Hash for TimeInForce
§impl Ord for TimeInForce
impl Ord for TimeInForce
§impl PartialEq for TimeInForce
impl PartialEq for TimeInForce
§impl PartialOrd for TimeInForce
impl PartialOrd for TimeInForce
§impl TryFrom<i32> for TimeInForce
impl TryFrom<i32> for TimeInForce
§type Error = UnknownEnumValue
type Error = UnknownEnumValue
§fn try_from(value: i32) -> Result<TimeInForce, UnknownEnumValue>
fn try_from(value: i32) -> Result<TimeInForce, UnknownEnumValue>
impl Copy for TimeInForce
impl Eq for TimeInForce
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 UnwindSafe for TimeInForce
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].