#[non_exhaustive]pub struct RestingOrder {
pub id: u64,
pub side: OrderSide,
pub price: f64,
pub size: f64,
pub participant: Option<u64>,
pub placed: Option<DateTime<Utc>>,
}Expand description
One resting order. Snapshot order establishes queue priority at each price.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: u64Exchange order id, unique within the subscription’s current book.
side: OrderSideBuy for bids, sell for asks.
price: f64Limit price.
size: f64Remaining size, finite and strictly positive.
participant: Option<u64>Host-defined identity of the participant that placed the order, such as a broker or market maker number, when the feed supplies one. Never inferred.
placed: Option<DateTime<Utc>>When the venue placed the order, when the feed supplies it. A price change that costs priority is still the same order unless the venue says otherwise by sending a new one.
Implementations§
Source§impl RestingOrder
impl RestingOrder
Sourcepub fn new(id: u64, side: OrderSide, price: f64, size: f64) -> Self
pub fn new(id: u64, side: OrderSide, price: f64, size: f64) -> Self
A resting order with its remaining size and no participant or placement time.
Sourcepub fn with_participant(self, participant: u64) -> Self
pub fn with_participant(self, participant: u64) -> Self
The same order, placed by participant.
Sourcepub fn with_placed(self, time: DateTime<Utc>) -> Self
pub fn with_placed(self, time: DateTime<Utc>) -> Self
The same order, placed at time.
Trait Implementations§
Source§impl Clone for RestingOrder
impl Clone for RestingOrder
Source§fn clone(&self) -> RestingOrder
fn clone(&self) -> RestingOrder
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 RestingOrder
impl Debug for RestingOrder
Source§impl<'de> Deserialize<'de> for RestingOrder
impl<'de> Deserialize<'de> for RestingOrder
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 RestingOrder
impl PartialEq for RestingOrder
Source§impl Serialize for RestingOrder
impl Serialize for RestingOrder
impl StructuralPartialEq for RestingOrder
Auto Trait Implementations§
impl Freeze for RestingOrder
impl RefUnwindSafe for RestingOrder
impl Send for RestingOrder
impl Sync for RestingOrder
impl Unpin for RestingOrder
impl UnsafeUnpin for RestingOrder
impl UnwindSafe for RestingOrder
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