pub enum OrderType {
Limit(Price),
Market,
}Expand description
The type of an order - Limit or Market.
§Example
use clob_sync::order::{OrderType, Price};
use fastnum::D128 as Dec;
use fastnum::decimal::Context;
use std::str::FromStr;
let limit = OrderType::Limit(Price::try_from("50000.00").unwrap());
let market = OrderType::Market;Variants§
Limit(Price)
A limit order with a specific price
Market
A market order that executes immediately at the best available price
Trait Implementations§
Source§impl Ord for OrderType
impl Ord for OrderType
Source§impl PartialOrd for OrderType
impl PartialOrd for OrderType
impl Eq for OrderType
impl StructuralPartialEq for OrderType
Auto Trait Implementations§
impl Freeze for OrderType
impl RefUnwindSafe for OrderType
impl Send for OrderType
impl Sync for OrderType
impl Unpin for OrderType
impl UnsafeUnpin for OrderType
impl UnwindSafe for OrderType
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