Skip to main content

OrderBookSide

Trait OrderBookSide 

Source
pub trait OrderBookSide: Sealed {
    // Required methods
    fn try_cross(&mut self, order: &Order) -> Result<Matches>;
    fn allocate(&mut self, order: Order);
}
Expand description

A trait for order book side implementations.

Implementors provide logic for crossing orders against the book and allocating orders to the book.

Required Methods§

Source

fn try_cross(&mut self, order: &Order) -> Result<Matches>

Attempts to cross an order against existing orders on this side of the book.

Source

fn allocate(&mut self, order: Order)

Allocates an order to this side of the book (after no-cross or partial cross).

Implementors§