SubscriptionMapper

Trait SubscriptionMapper 

Source
pub trait SubscriptionMapper {
    // Required method
    fn map<Exchange, Instrument, Kind>(
        subscriptions: &[Subscription<Exchange, Instrument, Kind>],
    ) -> SubscriptionMeta<Instrument::Key>
       where Exchange: Connector,
             Instrument: InstrumentData,
             Kind: SubscriptionKind,
             Subscription<Exchange, Instrument, Kind>: Identifier<Exchange::Channel> + Identifier<Exchange::Market>;
}
Expand description

Defines how to map a collection of Barter Subscriptions into exchange specific SubscriptionMeta, containing subscription payloads that are sent to the exchange.

Required Methods§

Source

fn map<Exchange, Instrument, Kind>( subscriptions: &[Subscription<Exchange, Instrument, Kind>], ) -> SubscriptionMeta<Instrument::Key>
where Exchange: Connector, Instrument: InstrumentData, Kind: SubscriptionKind, 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.

Implementors§