pub struct DataDistributor<S> { /* private fields */ }Expand description
Pulls data from a MarketStream and forwards it to registered handlers.
Implementations§
Source§impl<S> DataDistributor<S>where
S: MarketStream,
impl<S> DataDistributor<S>where
S: MarketStream,
Sourcepub async fn run(
&mut self,
tick_handler: &mut dyn TickHandler,
candle_handler: &mut dyn CandleHandler,
order_book_handler: &mut dyn OrderBookHandler,
) -> BrokerResult<()>
pub async fn run( &mut self, tick_handler: &mut dyn TickHandler, candle_handler: &mut dyn CandleHandler, order_book_handler: &mut dyn OrderBookHandler, ) -> BrokerResult<()>
Run the event loop until the stream ends.
Auto Trait Implementations§
impl<S> Freeze for DataDistributor<S>where
S: Freeze,
impl<S> RefUnwindSafe for DataDistributor<S>where
S: RefUnwindSafe,
impl<S> Send for DataDistributor<S>where
S: Send,
impl<S> Sync for DataDistributor<S>where
S: Sync,
impl<S> Unpin for DataDistributor<S>where
S: Unpin,
impl<S> UnwindSafe for DataDistributor<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more