MarketIter

Struct MarketIter 

Source
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: Debug, T: Debug> Debug for MarketIter<InstrumentKey, T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<InstrumentKey> From<(ExchangeId, InstrumentKey, BinanceFuturesOrderBookL2Update)> for MarketIter<InstrumentKey, OrderBookEvent>

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

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,

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

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>

Source§

fn from_iter<Iter>(iter: Iter) -> Self
where Iter: IntoIterator<Item = Result<MarketEvent<InstrumentKey, T>, DataError>>,

Creates a value from an iterator. Read more

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>
where InstrumentKey: Send, T: Send,

§

impl<InstrumentKey, T> Sync for MarketIter<InstrumentKey, T>
where InstrumentKey: Sync, T: Sync,

§

impl<InstrumentKey, T> Unpin for MarketIter<InstrumentKey, T>
where InstrumentKey: Unpin, T: Unpin,

§

impl<InstrumentKey, T> UnwindSafe for MarketIter<InstrumentKey, T>
where InstrumentKey: UnwindSafe, T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,