Trait InstrumentData

Source
pub trait InstrumentData
where Self: Clone + Debug + Send + Sync,
{ type Key: Debug + Clone + Eq + Send + Sync; // Required methods fn key(&self) -> &Self::Key; fn kind(&self) -> &MarketDataInstrumentKind; }
Expand description

Instrument related data that defines an associated unique Id.

Verbose InstrumentData is often used to subscribe to market data feeds, but it’s unique Id can then be used to key consumed MarketEvents, significantly reducing duplication in the case of complex instruments (eg/ options).

Required Associated Types§

Required Methods§

Source

fn key(&self) -> &Self::Key

Source

fn kind(&self) -> &MarketDataInstrumentKind

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.

Implementations on Foreign Types§

Source§

impl InstrumentData for MarketDataInstrument

Source§

impl<InstrumentKey> InstrumentData for Keyed<InstrumentKey, MarketDataInstrument>
where InstrumentKey: Debug + Clone + Eq + Send + Sync,

Source§

type Key = InstrumentKey

Source§

fn key(&self) -> &Self::Key

Source§

fn kind(&self) -> &MarketDataInstrumentKind

Implementors§

Source§

impl<InstrumentKey> InstrumentData for MarketInstrumentData<InstrumentKey>
where InstrumentKey: Debug + Clone + Eq + Send + Sync,

Source§

type Key = InstrumentKey