pub struct RawSseSubscription { /* private fields */ }Expand description
Handle to an active raw SSE subscription.
Dropping this handle will cancel the subscription.
Implementations§
Source§impl RawSseSubscription
impl RawSseSubscription
Sourcepub async fn recv(&mut self) -> Option<RawSseEvent>
pub async fn recv(&mut self) -> Option<RawSseEvent>
Receive the next raw SSE message.
Returns None if the stream is closed.
Sourcepub fn stats(&self) -> SseStreamStats
pub fn stats(&self) -> SseStreamStats
Get a snapshot of stream diagnostics.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RawSseSubscription
impl RefUnwindSafe for RawSseSubscription
impl Send for RawSseSubscription
impl Sync for RawSseSubscription
impl Unpin for RawSseSubscription
impl UnwindSafe for RawSseSubscription
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