Skip to main content

BookLevelSource

Trait BookLevelSource 

Source
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§

Source

fn price(&self) -> Decimal

Price of the level.

Source

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§

Source§

impl BookLevelSource for OrderBookLevel

Source§

fn price(&self) -> Decimal

Source§

fn quantity(&self) -> Decimal

Source§

impl BookLevelSource for OrderBookLevel

Source§

fn price(&self) -> Decimal

Source§

fn quantity(&self) -> Decimal

Implementors§