pub struct Sse { /* private fields */ }Expand description
A backpressure-aware Server-Sent Events response.
Implementations§
Source§impl Sse
impl Sse
Sourcepub fn new<S, E>(events: S) -> Self
pub fn new<S, E>(events: S) -> Self
Build SSE from a fallible event source. Source errors are redacted at the wire boundary.
Sourcepub fn from_events<S>(events: S) -> Self
pub fn from_events<S>(events: S) -> Self
Build SSE from an infallible event source.
pub fn keep_alive(self, keep_alive: KeepAlive) -> Self
Sourcepub fn max_event_size(self, bytes: usize) -> Result<Self, SseConfigError>
pub fn max_event_size(self, bytes: usize) -> Result<Self, SseConfigError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Sse
impl !Sync for Sse
impl !UnwindSafe for Sse
impl Freeze for Sse
impl Send for Sse
impl Unpin for Sse
impl UnsafeUnpin for Sse
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