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<Subscribed<Instrument::Key>, 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§
fn subscribe<'life0, 'async_trait, Exchange, Instrument, Kind>(
subscriptions: &'life0 [Subscription<Exchange, Instrument, Kind>],
) -> Pin<Box<dyn Future<Output = Result<Subscribed<Instrument::Key>, 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,
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.