pub struct StatelessTransformer<Exchange, InstrumentKey, Kind, Input> { /* private fields */ }Expand description
Standard generic stateless ExchangeTransformer to translate exchange specific types into
normalised Barter types. Often used with
PublicTrades or
OrderBooksL1 streams.
Trait Implementations§
Source§impl<Exchange: Clone, InstrumentKey: Clone, Kind: Clone, Input: Clone> Clone for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
impl<Exchange: Clone, InstrumentKey: Clone, Kind: Clone, Input: Clone> Clone for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
Source§fn clone(&self) -> StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
fn clone(&self) -> StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Exchange: Debug, InstrumentKey: Debug, Kind: Debug, Input: Debug> Debug for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
impl<Exchange: Debug, InstrumentKey: Debug, Kind: Debug, Input: Debug> Debug for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
Source§impl<Exchange, InstrumentKey, Kind, Input> ExchangeTransformer<Exchange, InstrumentKey, Kind> for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>where
Exchange: Connector + Send,
InstrumentKey: Clone + Send,
Kind: SubscriptionKind + Send,
Input: Identifier<Option<SubscriptionId>> + for<'de> Deserialize<'de>,
MarketIter<InstrumentKey, Kind::Event>: From<(ExchangeId, InstrumentKey, Input)>,
impl<Exchange, InstrumentKey, Kind, Input> ExchangeTransformer<Exchange, InstrumentKey, Kind> for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>where
Exchange: Connector + Send,
InstrumentKey: Clone + Send,
Kind: SubscriptionKind + Send,
Input: Identifier<Option<SubscriptionId>> + for<'de> Deserialize<'de>,
MarketIter<InstrumentKey, Kind::Event>: From<(ExchangeId, InstrumentKey, Input)>,
Source§impl<Exchange: PartialEq, InstrumentKey: PartialEq, Kind: PartialEq, Input: PartialEq> PartialEq for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
impl<Exchange: PartialEq, InstrumentKey: PartialEq, Kind: PartialEq, Input: PartialEq> PartialEq for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
Source§fn eq(
&self,
other: &StatelessTransformer<Exchange, InstrumentKey, Kind, Input>,
) -> bool
fn eq( &self, other: &StatelessTransformer<Exchange, InstrumentKey, Kind, Input>, ) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl<Exchange, InstrumentKey, Kind, Input> Transformer for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>where
Exchange: Connector,
InstrumentKey: Clone,
Kind: SubscriptionKind,
Input: Identifier<Option<SubscriptionId>> + for<'de> Deserialize<'de>,
MarketIter<InstrumentKey, Kind::Event>: From<(ExchangeId, InstrumentKey, Input)>,
impl<Exchange, InstrumentKey, Kind, Input> Transformer for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>where
Exchange: Connector,
InstrumentKey: Clone,
Kind: SubscriptionKind,
Input: Identifier<Option<SubscriptionId>> + for<'de> Deserialize<'de>,
MarketIter<InstrumentKey, Kind::Event>: From<(ExchangeId, InstrumentKey, Input)>,
type Error = DataError
type Input = Input
type Output = MarketEvent<InstrumentKey, <Kind as SubscriptionKind>::Event>
type OutputIter = Vec<Result<<StatelessTransformer<Exchange, InstrumentKey, Kind, Input> as Transformer>::Output, <StatelessTransformer<Exchange, InstrumentKey, Kind, Input> as Transformer>::Error>>
fn transform(&mut self, input: Self::Input) -> Self::OutputIter
impl<Exchange: Eq, InstrumentKey: Eq, Kind: Eq, Input: Eq> Eq for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
impl<Exchange, InstrumentKey, Kind, Input> StructuralPartialEq for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
Auto Trait Implementations§
impl<Exchange, InstrumentKey, Kind, Input> Freeze for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
impl<Exchange, InstrumentKey, Kind, Input> RefUnwindSafe for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>where
Exchange: RefUnwindSafe,
Kind: RefUnwindSafe,
Input: RefUnwindSafe,
InstrumentKey: RefUnwindSafe,
impl<Exchange, InstrumentKey, Kind, Input> Send for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
impl<Exchange, InstrumentKey, Kind, Input> Sync for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
impl<Exchange, InstrumentKey, Kind, Input> Unpin for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
impl<Exchange, InstrumentKey, Kind, Input> UnwindSafe for StatelessTransformer<Exchange, InstrumentKey, Kind, Input>
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> 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