pub struct DepthBook { /* private fields */ }Expand description
Order book of a symbol, rebuilt from the changes of its market depth.
Implementations§
Source§impl DepthBook
impl DepthBook
Sourcepub fn apply(&mut self, update: &DepthUpdate)
pub fn apply(&mut self, update: &DepthUpdate)
Applies a change: drops the deleted entries, then stores the new ones.
Sourcepub fn bids(&self) -> Vec<DepthQuote>
pub fn bids(&self) -> Vec<DepthQuote>
Returns the bids, best (highest) price first.
Sourcepub fn asks(&self) -> Vec<DepthQuote>
pub fn asks(&self) -> Vec<DepthQuote>
Returns the asks, best (lowest) price first.
Trait Implementations§
impl Eq for DepthBook
impl StructuralPartialEq for DepthBook
Auto Trait Implementations§
impl Forget for DepthBook
impl Freeze for DepthBook
impl Move for DepthBook
impl RefUnwindSafe for DepthBook
impl Send for DepthBook
impl Sync for DepthBook
impl Unpin for DepthBook
impl UnsafeUnpin for DepthBook
impl UnwindSafe for DepthBook
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