Struct barter_data::subscription::Subscription
source · pub struct Subscription<Exchange, Kind> {
pub exchange: Exchange,
pub instrument: Instrument,
pub kind: Kind,
}Expand description
Barter Subscription used to subscribe to a SubKind for a particular exchange
Instrument.
Fields§
§exchange: Exchange§instrument: Instrument§kind: KindImplementations§
source§impl<Exchange, Kind> Subscription<Exchange, Kind>
impl<Exchange, Kind> Subscription<Exchange, Kind>
sourcepub fn new<I>(exchange: Exchange, instrument: I, kind: Kind) -> Selfwhere
I: Into<Instrument>,
pub fn new<I>(exchange: Exchange, instrument: I, kind: Kind) -> Selfwhere
I: Into<Instrument>,
Constructs a new Subscription using the provided configuration.
Trait Implementations§
source§impl<Exchange: Clone, Kind: Clone> Clone for Subscription<Exchange, Kind>
impl<Exchange: Clone, Kind: Clone> Clone for Subscription<Exchange, Kind>
source§fn clone(&self) -> Subscription<Exchange, Kind>
fn clone(&self) -> Subscription<Exchange, Kind>
Returns a copy 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<'de, Exchange, Kind> Deserialize<'de> for Subscription<Exchange, Kind>where
Exchange: Deserialize<'de>,
Kind: Deserialize<'de>,
impl<'de, Exchange, Kind> Deserialize<'de> for Subscription<Exchange, Kind>where
Exchange: Deserialize<'de>,
Kind: 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<Exchange, Kind> Display for Subscription<Exchange, Kind>where
Exchange: Display,
Kind: Display,
impl<Exchange, Kind> Display for Subscription<Exchange, Kind>where
Exchange: Display,
Kind: Display,
source§impl<Exchange, I, Kind> From<(Exchange, I, Kind)> for Subscription<Exchange, Kind>where
I: Into<Instrument>,
impl<Exchange, I, Kind> From<(Exchange, I, Kind)> for Subscription<Exchange, Kind>where
I: Into<Instrument>,
source§fn from((exchange, instrument, kind): (Exchange, I, Kind)) -> Self
fn from((exchange, instrument, kind): (Exchange, I, Kind)) -> Self
Converts to this type from the input type.
source§impl<Exchange, S, Kind> From<(Exchange, S, S, InstrumentKind, Kind)> for Subscription<Exchange, Kind>where
S: Into<Symbol>,
impl<Exchange, S, Kind> From<(Exchange, S, S, InstrumentKind, Kind)> for Subscription<Exchange, Kind>where
S: Into<Symbol>,
source§fn from(
(exchange, base, quote, instrument_kind, kind): (Exchange, S, S, InstrumentKind, Kind)
) -> Self
fn from(
(exchange, base, quote, instrument_kind, kind): (Exchange, S, S, InstrumentKind, Kind)
) -> Self
Converts to this type from the input type.
source§impl<Server> Identifier<BinanceChannel> for Subscription<Binance<Server>, OrderBooksL1>
impl<Server> Identifier<BinanceChannel> for Subscription<Binance<Server>, OrderBooksL1>
fn id(&self) -> BinanceChannel
source§impl<Server> Identifier<BinanceChannel> for Subscription<Binance<Server>, OrderBooksL2>
impl<Server> Identifier<BinanceChannel> for Subscription<Binance<Server>, OrderBooksL2>
fn id(&self) -> BinanceChannel
source§impl<Server> Identifier<BinanceChannel> for Subscription<Binance<Server>, PublicTrades>
impl<Server> Identifier<BinanceChannel> for Subscription<Binance<Server>, PublicTrades>
fn id(&self) -> BinanceChannel
source§impl Identifier<BinanceChannel> for Subscription<BinanceFuturesUsd, Liquidations>
impl Identifier<BinanceChannel> for Subscription<BinanceFuturesUsd, Liquidations>
fn id(&self) -> BinanceChannel
source§impl<Server, Kind> Identifier<BinanceMarket> for Subscription<Binance<Server>, Kind>
impl<Server, Kind> Identifier<BinanceMarket> for Subscription<Binance<Server>, Kind>
fn id(&self) -> BinanceMarket
source§impl Identifier<BitfinexChannel> for Subscription<Bitfinex, PublicTrades>
impl Identifier<BitfinexChannel> for Subscription<Bitfinex, PublicTrades>
fn id(&self) -> BitfinexChannel
source§impl<Kind> Identifier<BitfinexMarket> for Subscription<Bitfinex, Kind>
impl<Kind> Identifier<BitfinexMarket> for Subscription<Bitfinex, Kind>
fn id(&self) -> BitfinexMarket
source§impl Identifier<CoinbaseChannel> for Subscription<Coinbase, PublicTrades>
impl Identifier<CoinbaseChannel> for Subscription<Coinbase, PublicTrades>
fn id(&self) -> CoinbaseChannel
source§impl<Kind> Identifier<CoinbaseMarket> for Subscription<Coinbase, Kind>
impl<Kind> Identifier<CoinbaseMarket> for Subscription<Coinbase, Kind>
fn id(&self) -> CoinbaseMarket
source§impl<Server> Identifier<GateioChannel> for Subscription<Server, PublicTrades>
impl<Server> Identifier<GateioChannel> for Subscription<Server, PublicTrades>
fn id(&self) -> GateioChannel
source§impl<Server, Kind> Identifier<GateioMarket> for Subscription<Gateio<Server>, Kind>
impl<Server, Kind> Identifier<GateioMarket> for Subscription<Gateio<Server>, Kind>
fn id(&self) -> GateioMarket
source§impl Identifier<KrakenChannel> for Subscription<Kraken, OrderBooksL1>
impl Identifier<KrakenChannel> for Subscription<Kraken, OrderBooksL1>
fn id(&self) -> KrakenChannel
source§impl Identifier<KrakenChannel> for Subscription<Kraken, PublicTrades>
impl Identifier<KrakenChannel> for Subscription<Kraken, PublicTrades>
fn id(&self) -> KrakenChannel
source§impl<Kind> Identifier<KrakenMarket> for Subscription<Kraken, Kind>
impl<Kind> Identifier<KrakenMarket> for Subscription<Kraken, Kind>
fn id(&self) -> KrakenMarket
source§impl Identifier<OkxChannel> for Subscription<Okx, PublicTrades>
impl Identifier<OkxChannel> for Subscription<Okx, PublicTrades>
fn id(&self) -> OkxChannel
source§impl<Kind> Identifier<OkxMarket> for Subscription<Okx, Kind>
impl<Kind> Identifier<OkxMarket> for Subscription<Okx, Kind>
source§impl<Exchange: Ord, Kind: Ord> Ord for Subscription<Exchange, Kind>
impl<Exchange: Ord, Kind: Ord> Ord for Subscription<Exchange, Kind>
source§fn cmp(&self, other: &Subscription<Exchange, Kind>) -> Ordering
fn cmp(&self, other: &Subscription<Exchange, Kind>) -> Ordering
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<Exchange: PartialEq, Kind: PartialEq> PartialEq<Subscription<Exchange, Kind>> for Subscription<Exchange, Kind>
impl<Exchange: PartialEq, Kind: PartialEq> PartialEq<Subscription<Exchange, Kind>> for Subscription<Exchange, Kind>
source§fn eq(&self, other: &Subscription<Exchange, Kind>) -> bool
fn eq(&self, other: &Subscription<Exchange, Kind>) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl<Exchange: PartialOrd, Kind: PartialOrd> PartialOrd<Subscription<Exchange, Kind>> for Subscription<Exchange, Kind>
impl<Exchange: PartialOrd, Kind: PartialOrd> PartialOrd<Subscription<Exchange, Kind>> for Subscription<Exchange, Kind>
source§fn partial_cmp(&self, other: &Subscription<Exchange, Kind>) -> Option<Ordering>
fn partial_cmp(&self, other: &Subscription<Exchange, Kind>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<Exchange, Kind> Serialize for Subscription<Exchange, Kind>where
Exchange: Serialize,
Kind: Serialize,
impl<Exchange, Kind> Serialize for Subscription<Exchange, Kind>where
Exchange: Serialize,
Kind: Serialize,
source§impl<Exchange, Kind> Validator for &Subscription<Exchange, Kind>where
Exchange: StreamSelector<Kind>,
Kind: SubKind,
impl<Exchange, Kind> Validator for &Subscription<Exchange, Kind>where
Exchange: StreamSelector<Kind>,
Kind: SubKind,
impl<Exchange: Eq, Kind: Eq> Eq for Subscription<Exchange, Kind>
impl<Exchange, Kind> StructuralEq for Subscription<Exchange, Kind>
impl<Exchange, Kind> StructuralPartialEq for Subscription<Exchange, Kind>
Auto Trait Implementations§
impl<Exchange, Kind> RefUnwindSafe for Subscription<Exchange, Kind>where
Exchange: RefUnwindSafe,
Kind: RefUnwindSafe,
impl<Exchange, Kind> Send for Subscription<Exchange, Kind>where
Exchange: Send,
Kind: Send,
impl<Exchange, Kind> Sync for Subscription<Exchange, Kind>where
Exchange: Sync,
Kind: Sync,
impl<Exchange, Kind> Unpin for Subscription<Exchange, Kind>where
Exchange: Unpin,
Kind: Unpin,
impl<Exchange, Kind> UnwindSafe for Subscription<Exchange, Kind>where
Exchange: UnwindSafe,
Kind: UnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.