pub enum Event<Origin, T> {
Reconnecting(Origin),
Item(T),
}Expand description
ReconnectingStream Event that communicates either Stream::Item, or that the inner
Stream is currently reconnecting.
Variants§
Implementations§
Trait Implementations§
Source§impl<'de, Origin, T> Deserialize<'de> for Event<Origin, T>where
Origin: Deserialize<'de>,
T: Deserialize<'de>,
impl<'de, Origin, T> Deserialize<'de> for Event<Origin, T>where
Origin: Deserialize<'de>,
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, Candle>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, Candle>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
Source§fn from(value: MarketStreamResult<InstrumentKey, Candle>) -> Self
fn from(value: MarketStreamResult<InstrumentKey, Candle>) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, Liquidation>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, Liquidation>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
Source§fn from(value: MarketStreamResult<InstrumentKey, Liquidation>) -> Self
fn from(value: MarketStreamResult<InstrumentKey, Liquidation>) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, OrderBookEvent>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, OrderBookEvent>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
Source§fn from(value: MarketStreamResult<InstrumentKey, OrderBookEvent>) -> Self
fn from(value: MarketStreamResult<InstrumentKey, OrderBookEvent>) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, OrderBookL1>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, OrderBookL1>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
Source§fn from(value: MarketStreamResult<InstrumentKey, OrderBookL1>) -> Self
fn from(value: MarketStreamResult<InstrumentKey, OrderBookL1>) -> Self
Converts to this type from the input type.
Source§impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, PublicTrade>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
impl<InstrumentKey> From<Event<ExchangeId, Result<MarketEvent<InstrumentKey, PublicTrade>, DataError>>> for MarketStreamResult<InstrumentKey, DataKind>
Source§fn from(value: MarketStreamResult<InstrumentKey, PublicTrade>) -> Self
fn from(value: MarketStreamResult<InstrumentKey, PublicTrade>) -> Self
Converts to this type from the input type.
Source§impl<Origin: Ord, T: Ord> Ord for Event<Origin, T>
impl<Origin: Ord, T: Ord> Ord for Event<Origin, T>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<Origin: PartialOrd, T: PartialOrd> PartialOrd for Event<Origin, T>
impl<Origin: PartialOrd, T: PartialOrd> PartialOrd for Event<Origin, T>
impl<Origin: Copy, T: Copy> Copy for Event<Origin, T>
impl<Origin: Eq, T: Eq> Eq for Event<Origin, T>
impl<Origin, T> StructuralPartialEq for Event<Origin, T>
Auto Trait Implementations§
impl<Origin, T> Freeze for Event<Origin, T>
impl<Origin, T> RefUnwindSafe for Event<Origin, T>where
Origin: RefUnwindSafe,
T: RefUnwindSafe,
impl<Origin, T> Send for Event<Origin, T>
impl<Origin, T> Sync for Event<Origin, T>
impl<Origin, T> Unpin for Event<Origin, T>
impl<Origin, T> UnwindSafe for Event<Origin, T>where
Origin: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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