pub struct Subscription { /* private fields */ }Expand description
Managed market-overview stream with snapshot prefetch and live merge.
Delivery contract: a full consumer queue fails the subscription with
Error::QueueOverflow instead of silently dropping rows.
Implementations§
Source§impl Subscription
impl Subscription
Sourcepub fn updates(&mut self) -> &mut Receiver<Vec<MarketOverviewEntry>>
pub fn updates(&mut self) -> &mut Receiver<Vec<MarketOverviewEntry>>
Receiver for merged overview rows.
Sourcepub fn err(&self) -> Option<Error>
pub fn err(&self) -> Option<Error>
Terminal subscription error, if the stream failed (e.g. queue overflow).
Sourcepub fn set_on_error<F>(&self, callback: F)
pub fn set_on_error<F>(&self, callback: F)
Register a callback for background transport, decode, snapshot, or terminal buffering errors.
Sourcepub async fn refresh_snapshot(&self) -> Result<()>
pub async fn refresh_snapshot(&self) -> Result<()>
Refetch the REST snapshot.
Trait Implementations§
Source§impl Drop for Subscription
impl Drop for Subscription
Auto Trait Implementations§
impl !RefUnwindSafe for Subscription
impl !UnwindSafe for Subscription
impl Freeze for Subscription
impl Send for Subscription
impl Sync for Subscription
impl Unpin for Subscription
impl UnsafeUnpin for Subscription
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