pub enum CoinbaseSubResponse {
Subscribed {
channels: Vec<CoinbaseChannels>,
},
Error {
reason: String,
},
}Expand description
Coinbase WebSocket subscription response.
Raw Payload Examples
See docs: https://docs.cloud.coinbase.com/exchange/docs/websocket-overview#subscribe
Subscripion Success
{
"type":"subscriptions",
"channels":[
{"name":"matches","product_ids":["BTC-USD", "ETH-USD"]}
]
}
Subscription Failure
{
"type":"error",
"message":"Failed to subscribe",
"reason":"GIBBERISH-USD is not a valid product"
}
Variants§
Trait Implementations§
source§impl Clone for CoinbaseSubResponse
impl Clone for CoinbaseSubResponse
source§fn clone(&self) -> CoinbaseSubResponse
fn clone(&self) -> CoinbaseSubResponse
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 Debug for CoinbaseSubResponse
impl Debug for CoinbaseSubResponse
source§impl<'de> Deserialize<'de> for CoinbaseSubResponse
impl<'de> Deserialize<'de> for CoinbaseSubResponse
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 Hash for CoinbaseSubResponse
impl Hash for CoinbaseSubResponse
source§impl Ord for CoinbaseSubResponse
impl Ord for CoinbaseSubResponse
source§fn cmp(&self, other: &CoinbaseSubResponse) -> Ordering
fn cmp(&self, other: &CoinbaseSubResponse) -> 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 PartialEq<CoinbaseSubResponse> for CoinbaseSubResponse
impl PartialEq<CoinbaseSubResponse> for CoinbaseSubResponse
source§fn eq(&self, other: &CoinbaseSubResponse) -> bool
fn eq(&self, other: &CoinbaseSubResponse) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd<CoinbaseSubResponse> for CoinbaseSubResponse
impl PartialOrd<CoinbaseSubResponse> for CoinbaseSubResponse
source§fn partial_cmp(&self, other: &CoinbaseSubResponse) -> Option<Ordering>
fn partial_cmp(&self, other: &CoinbaseSubResponse) -> 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 Serialize for CoinbaseSubResponse
impl Serialize for CoinbaseSubResponse
source§impl Validator for CoinbaseSubResponse
impl Validator for CoinbaseSubResponse
impl Eq for CoinbaseSubResponse
impl StructuralEq for CoinbaseSubResponse
impl StructuralPartialEq for CoinbaseSubResponse
Auto Trait Implementations§
impl RefUnwindSafe for CoinbaseSubResponse
impl Send for CoinbaseSubResponse
impl Sync for CoinbaseSubResponse
impl Unpin for CoinbaseSubResponse
impl UnwindSafe for CoinbaseSubResponse
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.