pub struct Streams<T> {
pub streams: FnvHashMap<ExchangeId, UnboundedRx<T>>,
}Expand description
Ergonomic collection of exchange market event receivers.
Fields§
§streams: FnvHashMap<ExchangeId, UnboundedRx<T>>Implementations§
Source§impl<T> Streams<T>
impl<T> Streams<T>
Sourcepub fn builder<InstrumentKey, Kind>() -> StreamBuilder<InstrumentKey, Kind>where
Kind: SubscriptionKind,
pub fn builder<InstrumentKey, Kind>() -> StreamBuilder<InstrumentKey, Kind>where
Kind: SubscriptionKind,
Construct a StreamBuilder for configuring new market event Streams.
Sourcepub fn builder_multi() -> MultiStreamBuilder<T>
pub fn builder_multi() -> MultiStreamBuilder<T>
Construct a MultiStreamBuilder for configuring new
MarketEvent<T> Streams.
Sourcepub fn select(
&mut self,
exchange: ExchangeId,
) -> Option<impl Stream<Item = T> + '_>
pub fn select( &mut self, exchange: ExchangeId, ) -> Option<impl Stream<Item = T> + '_>
Sourcepub fn select_all(self) -> impl Stream<Item = T>
pub fn select_all(self) -> impl Stream<Item = T>
Select and merge every exchange Stream using
select_all.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for Streams<T>
impl<T> RefUnwindSafe for Streams<T>
impl<T> Send for Streams<T>where
T: Send,
impl<T> Sync for Streams<T>where
T: Send,
impl<T> Unpin for Streams<T>
impl<T> UnwindSafe for Streams<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