pub struct TradeStream;Expand description
Typed wrapper for public trade stream data.
Bybit sends an array of trades in each message.
Implementations§
Source§impl TradeStream
impl TradeStream
Sourcepub fn parse(data: &Value) -> Result<Vec<PublicTrade>>
pub fn parse(data: &Value) -> Result<Vec<PublicTrade>>
Parse raw WS data into a vector of trades.
Sourcepub fn matches_topic(topic: &str) -> bool
pub fn matches_topic(topic: &str) -> bool
Check if the given topic matches a public trade channel.
Auto Trait Implementations§
impl Freeze for TradeStream
impl RefUnwindSafe for TradeStream
impl Send for TradeStream
impl Sync for TradeStream
impl Unpin for TradeStream
impl UnsafeUnpin for TradeStream
impl UnwindSafe for TradeStream
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