#[non_exhaustive]pub enum OrderEvent {
Add(RestingOrder),
Modify {
id: u64,
price: Option<f64>,
size: Option<f64>,
keep_priority: bool,
},
Cancel {
id: u64,
},
Execute {
id: u64,
size: f64,
trade: Option<Tick>,
},
}Expand description
A sequenced change to one resting order. Unknown ids or invalid changes lose the book.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Add(RestingOrder)
Adds an order at the back of its price queue. Duplicate ids are invalid.
Modify
Replaces price or remaining size. A changed price always loses priority; otherwise
keep_priority preserves the position only when the venue says it does. Size zero cancels.
Fields
Cancel
Cancels the remaining order.
Execute
Removes size from an order, keeping its priority on a partial fill. A known trade is
pushed through the trade path with resting_order_id set. Never also push it without a
unique trade id. Size must not exceed the order’s remaining size; a relative tolerance
of 1e-9, as in footprint volume thresholds, exhausts a rounded remainder.
Trait Implementations§
Source§impl Clone for OrderEvent
impl Clone for OrderEvent
Source§fn clone(&self) -> OrderEvent
fn clone(&self) -> OrderEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 OrderEvent
impl Debug for OrderEvent
Source§impl<'de> Deserialize<'de> for OrderEvent
impl<'de> Deserialize<'de> for OrderEvent
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 OrderEvent
impl PartialEq for OrderEvent
Source§impl Serialize for OrderEvent
impl Serialize for OrderEvent
impl StructuralPartialEq for OrderEvent
Auto Trait Implementations§
impl Freeze for OrderEvent
impl RefUnwindSafe for OrderEvent
impl Send for OrderEvent
impl Sync for OrderEvent
impl Unpin for OrderEvent
impl UnsafeUnpin for OrderEvent
impl UnwindSafe for OrderEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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<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> ⓘ
Converts
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> ⓘ
Converts
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