#[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 that exist in one observation. A publication always replaces the stored snapshot, so an absent field clears the previous value rather than retaining it. A publisher that needs to combine observations must merge them itself, because it owns both the observation relationship and the combined source age.
The service records the current monotonic publish instant and the source age supplied by the publisher. Reads advance that source age by the elapsed time since publication when evaluating freshness.
#[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