Struct Sse

struct Sse<S> { ... }

An SSE response

Implementations

impl<S> Sse<S>

fn new(stream: S) -> Self
where
    S: TryStream<Ok = Event> + Send + 'static,
    <S as >::Error: Into<BoxError>

Create a new Sse response that will respond with the given stream of Events.

See the module docs for more details.

fn keep_alive(self: Self, keep_alive: KeepAlive) -> Self

Configure the interval between keep-alive messages.

Defaults to no keep-alive messages.

impl<H, T> HandlerWithoutStateExt for Sse<S>

fn into_service(self: Self) -> HandlerService<H, T, ()>
fn into_make_service(self: Self) -> IntoMakeService<HandlerService<H, T, ()>>
fn into_make_service_with_connect_info<C>(self: Self) -> IntoMakeServiceWithConnectInfo<HandlerService<H, T, ()>, C>

impl<S> Debug for Sse<S>

fn fmt(self: &Self, f: &mut fmt::Formatter<'_>) -> fmt::Result

impl<S> Freeze for Sse<S>

impl<S> RefUnwindSafe for Sse<S>

impl<S> Send for Sse<S>

impl<S> Sync for Sse<S>

impl<S> Unpin for Sse<S>

impl<S> UnwindSafe for Sse<S>

impl<S, E> IntoResponse for Sse<S>

fn into_response(self: Self) -> Response

impl<S: $crate::clone::Clone> Clone for Sse<S>

fn clone(self: &Self) -> Sse<S>

impl<T> Any for Sse<S>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Sse<S>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Sse<S>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for Sse<S>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> From for Sse<S>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> FromRef for Sse<S>

fn from_ref(input: &T) -> T

impl<T> Instrument for Sse<S>

impl<T> Same for Sse<S>

impl<T> ToOwned for Sse<S>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> WithSubscriber for Sse<S>

impl<T, U> Into for Sse<S>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Sse<S>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Sse<S>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<V, T> VZip for Sse<S>

fn vzip(self: Self) -> V