pub struct MarketIter<InstrumentKey, T>(pub Vec<Result<MarketEvent<InstrumentKey, T>, DataError>>);Expand description
Convenient new type containing a collection of MarketEvent<T>s.
Tuple Fields§
§0: Vec<Result<MarketEvent<InstrumentKey, T>, DataError>>Trait Implementations§
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceFuturesOrderBookL2Update)> for MarketIter<InstrumentKey, OrderBookEvent>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceFuturesOrderBookL2Update)> for MarketIter<InstrumentKey, OrderBookEvent>
Source§fn from(
(exchange, instrument, update): (ExchangeId, InstrumentKey, BinanceFuturesOrderBookL2Update),
) -> Self
fn from( (exchange, instrument, update): (ExchangeId, InstrumentKey, BinanceFuturesOrderBookL2Update), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceLiquidation)> for MarketIter<InstrumentKey, Liquidation>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceLiquidation)> for MarketIter<InstrumentKey, Liquidation>
Source§fn from(
(exchange_id, instrument, liquidation): (ExchangeId, InstrumentKey, BinanceLiquidation),
) -> Self
fn from( (exchange_id, instrument, liquidation): (ExchangeId, InstrumentKey, BinanceLiquidation), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceOrderBookL1)> for MarketIter<InstrumentKey, OrderBookL1>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceOrderBookL1)> for MarketIter<InstrumentKey, OrderBookL1>
Source§fn from(
(exchange_id, instrument, book): (ExchangeId, InstrumentKey, BinanceOrderBookL1),
) -> Self
fn from( (exchange_id, instrument, book): (ExchangeId, InstrumentKey, BinanceOrderBookL1), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceSpotOrderBookL2Update)> for MarketIter<InstrumentKey, OrderBookEvent>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceSpotOrderBookL2Update)> for MarketIter<InstrumentKey, OrderBookEvent>
Source§fn from(
(exchange_id, instrument, update): (ExchangeId, InstrumentKey, BinanceSpotOrderBookL2Update),
) -> Self
fn from( (exchange_id, instrument, update): (ExchangeId, InstrumentKey, BinanceSpotOrderBookL2Update), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceTrade)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceTrade)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange_id, instrument, trade): (ExchangeId, InstrumentKey, BinanceTrade),
) -> Self
fn from( (exchange_id, instrument, trade): (ExchangeId, InstrumentKey, BinanceTrade), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BitfinexMessage)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BitfinexMessage)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange_id, instrument, message): (ExchangeId, InstrumentKey, BitfinexMessage),
) -> Self
fn from( (exchange_id, instrument, message): (ExchangeId, InstrumentKey, BitfinexMessage), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BitfinexTrade)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BitfinexTrade)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange_id, instrument, trade): (ExchangeId, InstrumentKey, BitfinexTrade),
) -> Self
fn from( (exchange_id, instrument, trade): (ExchangeId, InstrumentKey, BitfinexTrade), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, BitmexMessage<BitmexTradeInner>)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, BitmexMessage<BitmexTradeInner>)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange, instrument, trades): (ExchangeId, InstrumentKey, BitmexTrade),
) -> Self
fn from( (exchange, instrument, trades): (ExchangeId, InstrumentKey, BitmexTrade), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BybitPayload<BybitOrderBookInner>)> for MarketIter<InstrumentKey, OrderBookEvent>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BybitPayload<BybitOrderBookInner>)> for MarketIter<InstrumentKey, OrderBookEvent>
Source§fn from(
(exchange, instrument, message): (ExchangeId, InstrumentKey, BybitOrderBookMessage),
) -> Self
fn from( (exchange, instrument, message): (ExchangeId, InstrumentKey, BybitOrderBookMessage), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BybitPayload<BybitOrderBookInner>)> for MarketIter<InstrumentKey, OrderBookL1>where
InstrumentKey: Clone,
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BybitPayload<BybitOrderBookInner>)> for MarketIter<InstrumentKey, OrderBookL1>where
InstrumentKey: Clone,
Source§fn from(
(exchange, instrument, book): (ExchangeId, InstrumentKey, BybitOrderBookMessage),
) -> Self
fn from( (exchange, instrument, book): (ExchangeId, InstrumentKey, BybitOrderBookMessage), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, BybitPayload<Vec<BybitTradeInner>>)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, BybitPayload<Vec<BybitTradeInner>>)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange, instrument, trades): (ExchangeId, InstrumentKey, BybitTrade),
) -> Self
fn from( (exchange, instrument, trades): (ExchangeId, InstrumentKey, BybitTrade), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, CoinbaseTrade)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, CoinbaseTrade)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange_id, instrument, trade): (ExchangeId, InstrumentKey, CoinbaseTrade),
) -> Self
fn from( (exchange_id, instrument, trade): (ExchangeId, InstrumentKey, CoinbaseTrade), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, GateioMessage<GateioSpotTradeInner>)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, GateioMessage<GateioSpotTradeInner>)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange_id, instrument, trade): (ExchangeId, InstrumentKey, GateioSpotTrade),
) -> Self
fn from( (exchange_id, instrument, trade): (ExchangeId, InstrumentKey, GateioSpotTrade), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, GateioMessage<Vec<GateioFuturesTradeInner>>)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, GateioMessage<Vec<GateioFuturesTradeInner>>)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange, instrument, trades): (ExchangeId, InstrumentKey, GateioFuturesTrades),
) -> Self
fn from( (exchange, instrument, trades): (ExchangeId, InstrumentKey, GateioFuturesTrades), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<(ExchangeId, InstrumentKey, KrakenMessage<KrakenOrderBookL1Inner>)> for MarketIter<InstrumentKey, OrderBookL1>
impl<InstrumentKey> From<(ExchangeId, InstrumentKey, KrakenMessage<KrakenOrderBookL1Inner>)> for MarketIter<InstrumentKey, OrderBookL1>
Source§fn from(
(exchange_id, instrument, book): (ExchangeId, InstrumentKey, KrakenOrderBookL1),
) -> Self
fn from( (exchange_id, instrument, book): (ExchangeId, InstrumentKey, KrakenOrderBookL1), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, KrakenMessage<KrakenTradesInner>)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, KrakenMessage<KrakenTradesInner>)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange, instrument, trades): (ExchangeId, InstrumentKey, KrakenTrades),
) -> Self
fn from( (exchange, instrument, trades): (ExchangeId, InstrumentKey, KrakenTrades), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, OkxMessage<OkxTrade>)> for MarketIter<InstrumentKey, PublicTrade>
impl<InstrumentKey: Clone> From<(ExchangeId, InstrumentKey, OkxMessage<OkxTrade>)> for MarketIter<InstrumentKey, PublicTrade>
Source§fn from(
(exchange, instrument, trades): (ExchangeId, InstrumentKey, OkxTrades),
) -> Self
fn from( (exchange, instrument, trades): (ExchangeId, InstrumentKey, OkxTrades), ) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey, T> FromIterator<Result<MarketEvent<InstrumentKey, T>, DataError>> for MarketIter<InstrumentKey, T>
impl<InstrumentKey, T> FromIterator<Result<MarketEvent<InstrumentKey, T>, DataError>> for MarketIter<InstrumentKey, T>
Auto Trait Implementations§
impl<InstrumentKey, T> Freeze for MarketIter<InstrumentKey, T>
impl<InstrumentKey, T> RefUnwindSafe for MarketIter<InstrumentKey, T>where
InstrumentKey: RefUnwindSafe,
T: RefUnwindSafe,
impl<InstrumentKey, T> Send for MarketIter<InstrumentKey, T>
impl<InstrumentKey, T> Sync for MarketIter<InstrumentKey, T>
impl<InstrumentKey, T> Unpin for MarketIter<InstrumentKey, T>
impl<InstrumentKey, T> UnwindSafe for MarketIter<InstrumentKey, T>where
InstrumentKey: UnwindSafe,
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more