Trait barter_data::subscriber::Subscriber

source ·
pub trait Subscriber {
    type SubMapper: SubscriptionMapper;

    // Required method
    fn subscribe<'life0, 'async_trait, Exchange, Instrument, Kind>(
        subscriptions: &'life0 [Subscription<Exchange, Instrument, Kind>],
    ) -> Pin<Box<dyn Future<Output = Result<(WebSocket, Map<Instrument::Id>), SocketError>> + Send + 'async_trait>>
       where Exchange: Connector + Send + Sync + 'async_trait,
             Kind: SubscriptionKind + Send + Sync + 'async_trait,
             Instrument: InstrumentData + 'async_trait,
             Subscription<Exchange, Instrument, 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.

Required Associated Types§

Required Methods§

source

fn subscribe<'life0, 'async_trait, Exchange, Instrument, Kind>( subscriptions: &'life0 [Subscription<Exchange, Instrument, Kind>], ) -> Pin<Box<dyn Future<Output = Result<(WebSocket, Map<Instrument::Id>), SocketError>> + Send + 'async_trait>>
where Exchange: Connector + Send + Sync + 'async_trait, Kind: SubscriptionKind + Send + Sync + 'async_trait, Instrument: InstrumentData + 'async_trait, Subscription<Exchange, Instrument, Kind>: Identifier<Exchange::Channel> + Identifier<Exchange::Market>, 'life0: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§