Skip to main content

BookLevelSource

Trait BookLevelSource 

pub trait BookLevelSource {
    // Required methods
    fn price(&self) -> Decimal;
    fn quantity(&self) -> Decimal;
}
Expand description

A price level of an order book in either wire form (REST or WebSocket), so one function can map both.

Required Methods§

fn price(&self) -> Decimal

Price of the level.

fn quantity(&self) -> Decimal

Quantity at the level, as the broker sends it.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

§

impl BookLevelSource for OrderBookLevel

§

fn price(&self) -> Decimal

§

fn quantity(&self) -> Decimal

§

impl BookLevelSource for OrderBookLevel

§

fn price(&self) -> Decimal

§

fn quantity(&self) -> Decimal

Implementors§