pub struct MarketDataStream { /* private fields */ }Expand description
One sequenced connection to Strata’s product-level market stream.
The stream returns only public book, best-price, trade, and market-status events. A malformed frame or sequence gap returns an error and closes the connection; reconnecting obtains a fresh snapshot.
Implementations§
Source§impl MarketDataStream
impl MarketDataStream
pub fn market_id(&self) -> &str
Sourcepub async fn next_event(
&mut self,
) -> Result<Option<PlatformMarketDataEvent>, SdkError>
pub async fn next_event( &mut self, ) -> Result<Option<PlatformMarketDataEvent>, SdkError>
Receive and validate the next public event. Ok(None) means the peer
closed cleanly. Callers should reconnect after any error or close.
pub async fn close(&mut self) -> Result<(), SdkError>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MarketDataStream
impl !RefUnwindSafe for MarketDataStream
impl !UnwindSafe for MarketDataStream
impl Send for MarketDataStream
impl Sync for MarketDataStream
impl Unpin for MarketDataStream
impl UnsafeUnpin for MarketDataStream
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