pub trait MarketStream<Exchange, Kind>where
    Self: Stream<Item = Result<MarketEvent<Kind::Event>, DataError>> + Send + Sized + Unpin,
    Exchange: Connector,
    Kind: SubKind,{
    // Required method
    fn init<'life0, 'async_trait>(
        subscriptions: &'life0 [Subscription<Exchange, Kind>]
    ) -> Pin<Box<dyn Future<Output = Result<Self, DataError>> + Send + 'async_trait>>
       where Subscription<Exchange, Kind>: Identifier<Exchange::Channel> + Identifier<Exchange::Market>,
             Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

[Stream] that yields Market<Kind> events. The type of Market<Kind> depends on the provided SubKind of the passed Subscriptions.

Required Methods§

source

fn init<'life0, 'async_trait>( subscriptions: &'life0 [Subscription<Exchange, Kind>] ) -> Pin<Box<dyn Future<Output = Result<Self, DataError>> + Send + 'async_trait>>where Subscription<Exchange, Kind>: Identifier<Exchange::Channel> + Identifier<Exchange::Market>, Self: 'async_trait, 'life0: 'async_trait,

Implementors§

source§

impl<Exchange, Kind, Transformer> MarketStream<Exchange, Kind> for ExchangeWsStream<Transformer>where Exchange: Connector + Send + Sync, Kind: SubKind + Send + Sync, Transformer: ExchangeTransformer<Exchange, Kind> + Send, Kind::Event: Send,