Trait barter_data::MarketStream
source · [−]pub trait MarketStream: Stream<Item = Result<Event<MarketEvent>, SocketError>> + Sized + Unpin {
fn init<'life0, 'async_trait>(
subscriptions: &'life0 [Subscription]
) -> Pin<Box<dyn Future<Output = Result<Self, SocketError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}Expand description
[Stream] supertrait for streams that yield MarketEvents. Provides an entry-point
abstraction for an ExchangeSocket.
Required Methods
fn init<'life0, 'async_trait>(
subscriptions: &'life0 [Subscription]
) -> Pin<Box<dyn Future<Output = Result<Self, SocketError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn init<'life0, 'async_trait>(
subscriptions: &'life0 [Subscription]
) -> Pin<Box<dyn Future<Output = Result<Self, SocketError>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Initialises a new MarketStream using the provided subscriptions.