Skip to main content

L2Book

Struct L2Book 

pub struct L2Book { /* private fields */ }

Implementations§

§

impl L2Book

pub fn new() -> L2Book

pub fn clear(&mut self)

pub fn apply_snapshot( &mut self, bids: &[(Decimal, Decimal)], asks: &[(Decimal, Decimal)], )

pub fn apply_delta( &mut self, bids: &[(Decimal, Decimal)], asks: &[(Decimal, Decimal)], )

pub fn best_bid(&self) -> Option<Decimal>

pub fn best_ask(&self) -> Option<Decimal>

pub fn mid_price(&self) -> Option<Decimal>

pub fn bid_levels(&self) -> usize

pub fn ask_levels(&self) -> usize

pub fn fill_against_book( &mut self, side: Side, limit_price: Option<Decimal>, max_qty: Decimal, ) -> Option<FillResult>

Trait Implementations§

§

impl Clone for L2Book

§

fn clone(&self) -> L2Book

1.0.0 (const: )§

fn clone_from(&mut self, source: &Self)

§

impl Debug for L2Book

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

§

impl Default for L2Book

Auto Trait Implementations§

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
§

impl<T> From<T> for T

§

fn from(t: T) -> T

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

§

fn in_current_span(self) -> Instrumented<Self>

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

§

fn to_owned(&self) -> T

§

fn clone_into(&self, target: &mut T)

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

§

fn with_current_subscriber(self) -> WithDispatch<Self>

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,