pub struct SseStream { /* private fields */ }Expand description
An SSE-formatted byte stream wrapping a HubEvent receiver.
Implements Stream<Item = Result<Bytes, std::io::Error>> for use with
HTTP streaming response bodies (e.g. actix-web HttpResponse::streaming).
Emits:
- SSE-formatted event blocks for each
HubEvent - Periodic heartbeat comments (
: heartbeat\n\n) to keep connections alive
Implementations§
Trait Implementations§
Source§impl Stream for SseStream
impl Stream for SseStream
Auto Trait Implementations§
impl Freeze for SseStream
impl !RefUnwindSafe for SseStream
impl Send for SseStream
impl Sync for SseStream
impl Unpin for SseStream
impl UnsafeUnpin for SseStream
impl !UnwindSafe for SseStream
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