Struct barter_data::event::MarketIter
source · pub struct MarketIter<InstrumentId, T>(pub Vec<Result<MarketEvent<InstrumentId, T>, DataError>>);Expand description
Convenient new type containing a collection of MarketEvent<T>s.
Tuple Fields§
§0: Vec<Result<MarketEvent<InstrumentId, T>, DataError>>Trait Implementations§
source§impl<InstrumentId> From<(ExchangeId, InstrumentId, BinanceLiquidation)> for MarketIter<InstrumentId, Liquidation>
impl<InstrumentId> From<(ExchangeId, InstrumentId, BinanceLiquidation)> for MarketIter<InstrumentId, Liquidation>
source§fn from(
(exchange_id, instrument, liquidation): (ExchangeId, InstrumentId, BinanceLiquidation),
) -> Self
fn from( (exchange_id, instrument, liquidation): (ExchangeId, InstrumentId, BinanceLiquidation), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId> From<(ExchangeId, InstrumentId, BinanceOrderBookL1)> for MarketIter<InstrumentId, OrderBookL1>
impl<InstrumentId> From<(ExchangeId, InstrumentId, BinanceOrderBookL1)> for MarketIter<InstrumentId, OrderBookL1>
source§fn from(
(exchange_id, instrument, book): (ExchangeId, InstrumentId, BinanceOrderBookL1),
) -> Self
fn from( (exchange_id, instrument, book): (ExchangeId, InstrumentId, BinanceOrderBookL1), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId> From<(ExchangeId, InstrumentId, BinanceTrade)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId> From<(ExchangeId, InstrumentId, BinanceTrade)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, trade): (ExchangeId, InstrumentId, BinanceTrade),
) -> Self
fn from( (exchange_id, instrument, trade): (ExchangeId, InstrumentId, BinanceTrade), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId> From<(ExchangeId, InstrumentId, BitfinexMessage)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId> From<(ExchangeId, InstrumentId, BitfinexMessage)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, message): (ExchangeId, InstrumentId, BitfinexMessage),
) -> Self
fn from( (exchange_id, instrument, message): (ExchangeId, InstrumentId, BitfinexMessage), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId> From<(ExchangeId, InstrumentId, BitfinexTrade)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId> From<(ExchangeId, InstrumentId, BitfinexTrade)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, trade): (ExchangeId, InstrumentId, BitfinexTrade),
) -> Self
fn from( (exchange_id, instrument, trade): (ExchangeId, InstrumentId, BitfinexTrade), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, BitmexMessage<BitmexTradeInner>)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, BitmexMessage<BitmexTradeInner>)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, trades): (ExchangeId, InstrumentId, BitmexTrade),
) -> Self
fn from( (exchange_id, instrument, trades): (ExchangeId, InstrumentId, BitmexTrade), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, BybitMessage)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, BybitMessage)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, message): (ExchangeId, InstrumentId, BybitMessage),
) -> Self
fn from( (exchange_id, instrument, message): (ExchangeId, InstrumentId, BybitMessage), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, BybitPayload<Vec<BybitTradeInner>>)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, BybitPayload<Vec<BybitTradeInner>>)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, trades): (ExchangeId, InstrumentId, BybitTrade),
) -> Self
fn from( (exchange_id, instrument, trades): (ExchangeId, InstrumentId, BybitTrade), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId> From<(ExchangeId, InstrumentId, CoinbaseTrade)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId> From<(ExchangeId, InstrumentId, CoinbaseTrade)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, trade): (ExchangeId, InstrumentId, CoinbaseTrade),
) -> Self
fn from( (exchange_id, instrument, trade): (ExchangeId, InstrumentId, CoinbaseTrade), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId> From<(ExchangeId, InstrumentId, GateioMessage<GateioSpotTradeInner>)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId> From<(ExchangeId, InstrumentId, GateioMessage<GateioSpotTradeInner>)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, trade): (ExchangeId, InstrumentId, GateioSpotTrade),
) -> Self
fn from( (exchange_id, instrument, trade): (ExchangeId, InstrumentId, GateioSpotTrade), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, GateioMessage<Vec<GateioFuturesTradeInner>>)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, GateioMessage<Vec<GateioFuturesTradeInner>>)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, trades): (ExchangeId, InstrumentId, GateioFuturesTrades),
) -> Self
fn from( (exchange_id, instrument, trades): (ExchangeId, InstrumentId, GateioFuturesTrades), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId> From<(ExchangeId, InstrumentId, KrakenMessage<KrakenOrderBookL1Inner>)> for MarketIter<InstrumentId, OrderBookL1>
impl<InstrumentId> From<(ExchangeId, InstrumentId, KrakenMessage<KrakenOrderBookL1Inner>)> for MarketIter<InstrumentId, OrderBookL1>
source§fn from(
(exchange_id, instrument, book): (ExchangeId, InstrumentId, KrakenOrderBookL1),
) -> Self
fn from( (exchange_id, instrument, book): (ExchangeId, InstrumentId, KrakenOrderBookL1), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, KrakenMessage<KrakenTradesInner>)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, KrakenMessage<KrakenTradesInner>)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, trades): (ExchangeId, InstrumentId, KrakenTrades),
) -> Self
fn from( (exchange_id, instrument, trades): (ExchangeId, InstrumentId, KrakenTrades), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, OkxMessage<OkxTrade>)> for MarketIter<InstrumentId, PublicTrade>
impl<InstrumentId: Clone> From<(ExchangeId, InstrumentId, OkxMessage<OkxTrade>)> for MarketIter<InstrumentId, PublicTrade>
source§fn from(
(exchange_id, instrument, trades): (ExchangeId, InstrumentId, OkxTrades),
) -> Self
fn from( (exchange_id, instrument, trades): (ExchangeId, InstrumentId, OkxTrades), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId> From<(ExchangeId, InstrumentId, OrderBook)> for MarketIter<InstrumentId, OrderBook>
impl<InstrumentId> From<(ExchangeId, InstrumentId, OrderBook)> for MarketIter<InstrumentId, OrderBook>
source§fn from(
(exchange_id, instrument, book): (ExchangeId, InstrumentId, OrderBook),
) -> Self
fn from( (exchange_id, instrument, book): (ExchangeId, InstrumentId, OrderBook), ) -> Self
Converts to this type from the input type.
source§impl<InstrumentId, T> FromIterator<Result<MarketEvent<InstrumentId, T>, DataError>> for MarketIter<InstrumentId, T>
impl<InstrumentId, T> FromIterator<Result<MarketEvent<InstrumentId, T>, DataError>> for MarketIter<InstrumentId, T>
Auto Trait Implementations§
impl<InstrumentId, T> Freeze for MarketIter<InstrumentId, T>
impl<InstrumentId, T> !RefUnwindSafe for MarketIter<InstrumentId, T>
impl<InstrumentId, T> Send for MarketIter<InstrumentId, T>
impl<InstrumentId, T> Sync for MarketIter<InstrumentId, T>
impl<InstrumentId, T> Unpin for MarketIter<InstrumentId, T>
impl<InstrumentId, T> !UnwindSafe for MarketIter<InstrumentId, T>
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