pub enum MessageType {
Trade,
Level2Update,
Ticker,
Heartbeat,
Subscription,
Error,
Unknown,
}Expand description
Pre-allocated message types for zero-copy parsing
Variants§
Trade
Trade execution message
Level2Update
Level 2 order book update
Ticker
Ticker price/volume update
Heartbeat
Connection heartbeat message
Subscription
Channel subscription confirmation
Error
Error notification from exchange
Unknown
Unrecognized message type
Implementations§
Source§impl MessageType
impl MessageType
Sourcepub fn from_borrowed_value(value: &BorrowedValue<'_>) -> Self
pub fn from_borrowed_value(value: &BorrowedValue<'_>) -> Self
Parse message type from borrowed value (zero-copy)
Sourcepub fn from_owned_value(value: &OwnedValue) -> Self
pub fn from_owned_value(value: &OwnedValue) -> Self
Parse message type from owned value
Trait Implementations§
Source§impl Clone for MessageType
impl Clone for MessageType
Source§fn clone(&self) -> MessageType
fn clone(&self) -> MessageType
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MessageType
impl Debug for MessageType
Source§impl PartialEq for MessageType
impl PartialEq for MessageType
impl Copy for MessageType
impl StructuralPartialEq for MessageType
Auto Trait Implementations§
impl Freeze for MessageType
impl RefUnwindSafe for MessageType
impl Send for MessageType
impl Sync for MessageType
impl Unpin for MessageType
impl UnwindSafe for MessageType
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