Trait barter_data::subscriber::Subscriber
source · pub trait Subscriber {
type SubMapper: SubscriptionMapper;
fn subscribe<'life0, 'async_trait, Exchange, Kind>(
subscriptions: &'life0 [Subscription<Exchange, Kind>]
) -> Pin<Box<dyn Future<Output = Result<(WebSocket, Map<Instrument>), SocketError>> + Send + 'async_trait>>
where
Exchange: Connector + Send + Sync + 'async_trait,
Kind: SubKind + Send + Sync + 'async_trait,
Subscription<Exchange, Kind>: Identifier<Exchange::Channel> + Identifier<Exchange::Market>,
'life0: 'async_trait;
}Expand description
Defines how to connect to a socket and subscribe to market data streams.