Trait DataHandler

Source
pub trait DataHandler: Send + Sync {
    // Required methods
    fn handle_market_trade<'life0, 'async_trait>(
        &'life0 self,
        trade: MarketTrade,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn handle_orderbook_snapshot<'life0, 'async_trait>(
        &'life0 self,
        snapshot: OrderBookSnapshot,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Data handler trait for processing market data

Required Methods§

Source

fn handle_market_trade<'life0, 'async_trait>( &'life0 self, trade: MarketTrade, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle incoming market trade

Source

fn handle_orderbook_snapshot<'life0, 'async_trait>( &'life0 self, snapshot: OrderBookSnapshot, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle incoming orderbook snapshot

Implementors§