use super::Coinbase;
use crate::{
subscription::{trade::PublicTrades, Subscription},
Identifier,
};
use serde::Serialize;
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Serialize)]
pub struct CoinbaseChannel(pub &'static str);
impl CoinbaseChannel {
pub const TRADES: Self = Self("matches");
}
impl Identifier<CoinbaseChannel> for Subscription<Coinbase, PublicTrades> {
fn id(&self) -> CoinbaseChannel {
CoinbaseChannel::TRADES
}
}
impl AsRef<str> for CoinbaseChannel {
fn as_ref(&self) -> &str {
self.0
}
}