pub enum BitmexWsMessage {
Table(BitmexTableMessage),
Welcome {
info: String,
version: String,
timestamp: DateTime<Utc>,
docs: String,
heartbeat_enabled: bool,
limit: BitmexRateLimit,
app_name: Option<String>,
},
Subscription {
success: bool,
subscribe: Option<String>,
request: Option<BitmexHttpRequest>,
error: Option<String>,
},
Error {
status: u16,
error: String,
meta: HashMap<String, String>,
request: BitmexHttpRequest,
},
Reconnected,
}Expand description
Represents all possible message types from the BitMEX WebSocket API.
Variants§
Table(BitmexTableMessage)
Table websocket message.
Welcome
Initial welcome message received when connecting to the WebSocket.
Fields
§
limit: BitmexRateLimitRate limit information.
Subscription
Subscription response messages.
Fields
§
request: Option<BitmexHttpRequest>Original request metadata (present for subscribe/auth/unsubscribe).
Error
WebSocket error message.
Reconnected
Indicates a WebSocket reconnection has completed.
Trait Implementations§
Source§impl Debug for BitmexWsMessage
impl Debug for BitmexWsMessage
Source§impl<'de> Deserialize<'de> for BitmexWsMessage
impl<'de> Deserialize<'de> for BitmexWsMessage
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
Auto Trait Implementations§
impl Freeze for BitmexWsMessage
impl RefUnwindSafe for BitmexWsMessage
impl Send for BitmexWsMessage
impl Sync for BitmexWsMessage
impl Unpin for BitmexWsMessage
impl UnwindSafe for BitmexWsMessage
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.