pub struct KlineStream;Expand description
Typed wrapper for kline stream data.
Bybit sends an array with a single kline per message.
Implementations§
Source§impl KlineStream
impl KlineStream
Sourcepub fn parse(data: &Value) -> Result<Vec<KlineData>>
pub fn parse(data: &Value) -> Result<Vec<KlineData>>
Parse raw WS data into a vector of klines (usually single-element).
Sourcepub fn parse_single(data: &Value) -> Result<KlineData>
pub fn parse_single(data: &Value) -> Result<KlineData>
Parse and return the first kline (most common case).
Sourcepub fn matches_topic(topic: &str) -> bool
pub fn matches_topic(topic: &str) -> bool
Check if the given topic matches a kline channel.
Auto Trait Implementations§
impl Freeze for KlineStream
impl RefUnwindSafe for KlineStream
impl Send for KlineStream
impl Sync for KlineStream
impl Unpin for KlineStream
impl UnsafeUnpin for KlineStream
impl UnwindSafe for KlineStream
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