Struct obrewin_data_structures::market::UnsizedOrderbook
source · pub struct UnsizedOrderbook { /* private fields */ }Expand description
Represents unsized orderbook.
Trait Implementations§
source§impl Clone for UnsizedOrderbook
impl Clone for UnsizedOrderbook
source§fn clone(&self) -> UnsizedOrderbook
fn clone(&self) -> UnsizedOrderbook
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Default for UnsizedOrderbook
impl Default for UnsizedOrderbook
source§fn default() -> UnsizedOrderbook
fn default() -> UnsizedOrderbook
Returns the “default value” for a type. Read more
source§impl Orderbook for UnsizedOrderbook
impl Orderbook for UnsizedOrderbook
source§fn iter_ask<'s>(&'s self) -> WrappedIterator<'s, (&'s Price, &'s Quantity)> ⓘ
fn iter_ask<'s>(&'s self) -> WrappedIterator<'s, (&'s Price, &'s Quantity)> ⓘ
Return an iterator that yields asks from the best to the worst.
source§fn iter_bid<'s>(&'s self) -> WrappedIterator<'s, (&'s Price, &'s Quantity)> ⓘ
fn iter_bid<'s>(&'s self) -> WrappedIterator<'s, (&'s Price, &'s Quantity)> ⓘ
Return an iterator that yields bids from the best to the worst.
source§fn apply_delta(&mut self, price: Price, quantity: Quantity, is_ask: bool)
fn apply_delta(&mut self, price: Price, quantity: Quantity, is_ask: bool)
Apply delta on current orderbook.
This method does not guarantee that the modified state is valid.
source§fn best_ask<'s>(
&'s self,
) -> (&'s Price, &'s Quantity, WrappedIterator<'s, (&'s Price, &'s Quantity)>)
fn best_ask<'s>( &'s self, ) -> (&'s Price, &'s Quantity, WrappedIterator<'s, (&'s Price, &'s Quantity)>)
Return first ask price, first ask quantity, and iterator of remaining ask levels.
If there is no ask, return
Price::MIN as price and Quantity::ZERO as quantity.
You can safely drop iterator if there is no needs.source§fn best_bid<'s>(
&'s self,
) -> (&'s Price, &'s Quantity, WrappedIterator<'s, (&'s Price, &'s Quantity)>)
fn best_bid<'s>( &'s self, ) -> (&'s Price, &'s Quantity, WrappedIterator<'s, (&'s Price, &'s Quantity)>)
Return first bid price, first bid quantity, and iterator of remaining bid levels.
If there is no bid, return
Price::MAX as price and Quantity::ZERO as quantity.
You can safely drop iterator if there is no needs.Auto Trait Implementations§
impl Freeze for UnsizedOrderbook
impl RefUnwindSafe for UnsizedOrderbook
impl Send for UnsizedOrderbook
impl Sync for UnsizedOrderbook
impl Unpin for UnsizedOrderbook
impl UnwindSafe for UnsizedOrderbook
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