Trait barter_data::subscriber::mapper::SubscriptionMapper

source ·
pub trait SubscriptionMapper {
    // Required method
    fn map<Exchange, Instrument, Kind>(
        subscriptions: &[Subscription<Exchange, Instrument, Kind>],
    ) -> SubscriptionMeta<Instrument::Id>
       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::Id>
where Exchange: Connector, Instrument: InstrumentData, Kind: SubscriptionKind, Subscription<Exchange, Instrument, Kind>: Identifier<Exchange::Channel> + Identifier<Exchange::Market>,

Object Safety§

This trait is not object safe.

Implementors§