Trait axum::sse::SseHandler[][src]

pub trait SseHandler<B, In>: Sized {
    type Stream: TryStream<Ok = Event> + Send + 'static;
    type Error: IntoResponse;
    fn call<'async_trait>(
        self,
        input: In
    ) -> Pin<Box<dyn Future<Output = Result<Self::Stream, Self::Error>> + Send + 'async_trait>>
    where
        Self: 'async_trait
; }
Expand description

Trait for async functions that can be used to handle Server-sent event requests.

You shouldn’t need to depend on this trait directly. It is automatically implemented to closures of the right types.

See the module docs for more details.

Associated Types

The stream of events produced by the handler.

The error handler might fail with.

Required methods

Call the handler with the given input parsed by extractors and produce the stream of events.

Implementors