pub struct SseResponse<S> { /* private fields */ }Expand description
An SSE response: any stream of SseEvent values, plus the right headers.
Returns a Response<BoxBody> with Content-Type: text/event-stream,
Cache-Control: no-cache, X-Accel-Buffering: no, and Connection: keep-alive. The response status is 200 OK.
Implementations§
Trait Implementations§
Source§impl<S> IntoResponse for SseResponse<S>
impl<S> IntoResponse for SseResponse<S>
Source§fn into_response(self) -> Response<BoxBody>
fn into_response(self) -> Response<BoxBody>
Convert this value into an HTTP response.
Auto Trait Implementations§
impl<S> Freeze for SseResponse<S>where
S: Freeze,
impl<S> RefUnwindSafe for SseResponse<S>where
S: RefUnwindSafe,
impl<S> Send for SseResponse<S>where
S: Send,
impl<S> Sync for SseResponse<S>where
S: Sync,
impl<S> Unpin for SseResponse<S>where
S: Unpin,
impl<S> UnsafeUnpin for SseResponse<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for SseResponse<S>where
S: UnwindSafe,
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