pub struct SubscribeMessage {
pub event: String,
pub req_id: i64,
pub pair: Option<Vec<String>>,
pub subscription: Subscription,
}
Expand description
Struct for subscribing to any websocket channel.
Fields§
§event: String
§req_id: i64
§pair: Option<Vec<String>>
§subscription: Subscription
Implementations§
Source§impl SubscribeMessage
impl SubscribeMessage
Sourcepub fn new(
req_id: i64,
pair: Option<Vec<String>>,
subscription: Subscription,
) -> SubscribeMessage
pub fn new( req_id: i64, pair: Option<Vec<String>>, subscription: Subscription, ) -> SubscribeMessage
Return a new SubscribeMessage, potentially for a specific set of pairs.
Trait Implementations§
Source§impl Clone for SubscribeMessage
impl Clone for SubscribeMessage
Source§fn clone(&self) -> SubscribeMessage
fn clone(&self) -> SubscribeMessage
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 SubscribeMessage
impl Debug for SubscribeMessage
Source§impl<'de> Deserialize<'de> for SubscribeMessage
impl<'de> Deserialize<'de> for SubscribeMessage
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 From<SubscribeMessage> for UnsubscribeMessage
impl From<SubscribeMessage> for UnsubscribeMessage
Source§fn from(value: SubscribeMessage) -> Self
fn from(value: SubscribeMessage) -> Self
Create the corresponding UnsubscribeMessage for this SubscribeMessage
Auto Trait Implementations§
impl Freeze for SubscribeMessage
impl RefUnwindSafe for SubscribeMessage
impl Send for SubscribeMessage
impl Sync for SubscribeMessage
impl Unpin for SubscribeMessage
impl UnwindSafe for SubscribeMessage
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