pub trait MarketStream<Exchange, Instrument, Kind>where
Self: Stream<Item = Result<MarketEvent<Instrument::Key, Kind::Event>, DataError>> + Send + Sized + Unpin,
Exchange: Connector,
Instrument: InstrumentData,
Kind: SubscriptionKind,{
// Required method
fn init<SnapFetcher>(
subscriber: &Exchange::Subscriber,
subscriptions: &[Subscription<Exchange, Instrument, Kind>],
) -> impl Future<Output = Result<Self, DataError>> + Send
where SnapFetcher: SnapshotFetcher<Exchange, Kind>,
Subscription<Exchange, Instrument, Kind>: Identifier<Exchange::Channel> + Identifier<Exchange::Market>;
}Expand description
Stream that yields Market<Kind> events. The type of Market<Kind>
depends on the provided SubscriptionKind of the passed Subscriptions.
Required Methods§
fn init<SnapFetcher>(
subscriber: &Exchange::Subscriber,
subscriptions: &[Subscription<Exchange, Instrument, Kind>],
) -> impl Future<Output = Result<Self, DataError>> + Sendwhere
SnapFetcher: SnapshotFetcher<Exchange, Kind>,
Subscription<Exchange, Instrument, Kind>: Identifier<Exchange::Channel> + Identifier<Exchange::Market>,
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.