Struct barter_data::exchange::bitfinex::message::BitfinexMessage
source · pub struct BitfinexMessage {
pub channel_id: u32,
pub payload: BitfinexPayload,
}Expand description
Bitfinex message received over
WebSocket relating to an active
Subscription.
The message is associated with the original Subscription using the
channel_id field as the SubscriptionId.
§Raw Payload Examples
§Heartbeat
See docs: https://docs.bitfinex.com/docs/ws-general#heartbeating
[420191,"hb"]
§Side::Buy Trade
See docs: https://docs.bitfinex.com/reference/ws-public-trades
[420191,"te",[1225484398,1665452200022,0.08980641,19027.02807752]]
§Side::Sell Trade
See docs: https://docs.bitfinex.com/reference/ws-public-trades
[420191,"te",[1225484398,1665452200022,-0.08980641,19027.02807752]]
Fields§
§channel_id: u32§payload: BitfinexPayloadTrait Implementations§
source§impl Clone for BitfinexMessage
impl Clone for BitfinexMessage
source§fn clone(&self) -> BitfinexMessage
fn clone(&self) -> BitfinexMessage
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 BitfinexMessage
impl Debug for BitfinexMessage
source§impl<'de> Deserialize<'de> for BitfinexMessage
impl<'de> Deserialize<'de> for BitfinexMessage
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 Identifier<Option<SubscriptionId>> for BitfinexMessage
impl Identifier<Option<SubscriptionId>> for BitfinexMessage
fn id(&self) -> Option<SubscriptionId>
source§impl PartialEq for BitfinexMessage
impl PartialEq for BitfinexMessage
source§fn eq(&self, other: &BitfinexMessage) -> bool
fn eq(&self, other: &BitfinexMessage) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl PartialOrd for BitfinexMessage
impl PartialOrd for BitfinexMessage
source§fn partial_cmp(&self, other: &BitfinexMessage) -> Option<Ordering>
fn partial_cmp(&self, other: &BitfinexMessage) -> 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 BitfinexMessage
impl Serialize for BitfinexMessage
impl Copy for BitfinexMessage
impl StructuralPartialEq for BitfinexMessage
Auto Trait Implementations§
impl Freeze for BitfinexMessage
impl RefUnwindSafe for BitfinexMessage
impl Send for BitfinexMessage
impl Sync for BitfinexMessage
impl Unpin for BitfinexMessage
impl UnwindSafe for BitfinexMessage
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more