pub struct Coinbase {
pub ids: SubscriptionIds,
}Expand description
Coinbase Subscriber & ExchangeTransformer implementor for the collection
of Spot & Futures data.
Fields
ids: SubscriptionIdsTrait Implementations
sourceimpl<'de> Deserialize<'de> for Coinbase
impl<'de> Deserialize<'de> for Coinbase
sourcefn 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
sourceimpl ExchangeTransformer for Coinbase
impl ExchangeTransformer for Coinbase
sourceconst EXCHANGE: ExchangeId = ExchangeId::Coinbase
const EXCHANGE: ExchangeId = ExchangeId::Coinbase
Unique identifier for an ExchangeTransformer.
sourcefn new(_: UnboundedSender<WsMessage>, ids: SubscriptionIds) -> Self
fn new(_: UnboundedSender<WsMessage>, ids: SubscriptionIds) -> Self
Constructs a new ExchangeTransformer using a transmitter to the WsSink and the
SubscriptionIds HashMap. Read more
sourceimpl PartialEq<Coinbase> for Coinbase
impl PartialEq<Coinbase> for Coinbase
sourceimpl Subscriber for Coinbase
impl Subscriber for Coinbase
type SubResponse = CoinbaseSubResponse
type SubResponse = CoinbaseSubResponse
Deserialisable type that this Subscriber expects to receive from the exchange in
response to Subscription requests. Implements Validator in order to determine
if the SubResponse communicates a successful outcome. Read more
sourcefn base_url() -> &'static str
fn base_url() -> &'static str
Returns the Base URL of the exchange to establish a connection with.
sourcefn build_subscription_meta(
subscriptions: &[Subscription]
) -> Result<SubscriptionMeta, SocketError>
fn build_subscription_meta(
subscriptions: &[Subscription]
) -> Result<SubscriptionMeta, SocketError>
Uses the provided Barter Subscriptions to build exchange specific subscription
payloads. Generates a SubscriptionIds Hashmap that is used by an ExchangeTransformer
to identify the Barter Subscriptions associated with received messages. Read more
sourcefn subscribe<'life0, 'async_trait>(
subscriptions: &'life0 [Subscription]
) -> Pin<Box<dyn Future<Output = Result<(WebSocket, SubscriptionIds), SocketError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
fn subscribe<'life0, 'async_trait>(
subscriptions: &'life0 [Subscription]
) -> Pin<Box<dyn Future<Output = Result<(WebSocket, SubscriptionIds), SocketError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
Initialises a WebSocket connection, actions the provided collection of Barter
Subscriptions, and validates that the Subscription were accepted by the exchange. Read more
sourcefn validate<'life0, 'async_trait>(
websocket: &'life0 mut WebSocket,
expected_responses: usize
) -> Pin<Box<dyn Future<Output = Result<(), SocketError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
fn validate<'life0, 'async_trait>(
websocket: &'life0 mut WebSocket,
expected_responses: usize
) -> Pin<Box<dyn Future<Output = Result<(), SocketError>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: Send + 'async_trait,
Uses the provided WebSocket connection to consume Subscription responses and
validate their outcomes. Read more
sourcefn subscription_timeout() -> Duration
fn subscription_timeout() -> Duration
Return the expected Duration in which the exchange will respond to all actioned
WebSocket Subscription requests. Read more
sourceimpl Transformer<MarketEvent> for Coinbase
impl Transformer<MarketEvent> for Coinbase
type Input = CoinbaseMessage
type OutputIter = Vec<Result<MarketEvent, SocketError>, Global>
fn transform(&mut self, input: Self::Input) -> Self::OutputIter
impl Eq for Coinbase
impl StructuralEq for Coinbase
impl StructuralPartialEq for Coinbase
Auto Trait Implementations
impl RefUnwindSafe for Coinbase
impl Send for Coinbase
impl Sync for Coinbase
impl Unpin for Coinbase
impl UnwindSafe for Coinbase
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
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
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more