#[non_exhaustive]pub struct Quote {
pub mark: Option<Price>,
pub bid: Option<Price>,
pub ask: Option<Price>,
}Expand description
Current market snapshot for an instrument.
Every field is optional: producers publish only the fields they actually
have. How a Quote interacts with the slot’s previously stored value is
chosen by the publisher when calling the service:
MarketDataService::pushreplaces the entire snapshot - any field left asNonein the new quote is cleared from the slot.MarketDataService::push_patchmerges the new quote into the existing snapshot -Nonefields preserve the prior value,Somefields overwrite it.
In either case the slot’s publish instant is bumped to the current time.
#[non_exhaustive] keeps the door open for further optional fields in
future releases.
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.mark: Option<Price>Mark price.
bid: Option<Price>Best-bid price.
ask: Option<Price>Best-ask price.
Implementations§
Trait Implementations§
impl Copy for Quote
impl Eq for Quote
impl StructuralPartialEq for Quote
Auto Trait Implementations§
impl Freeze for Quote
impl RefUnwindSafe for Quote
impl Send for Quote
impl Sync for Quote
impl Unpin for Quote
impl UnsafeUnpin for Quote
impl UnwindSafe for Quote
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