Skip to main content

EventSourceExt

Trait EventSourceExt 

Source
pub trait EventSourceExt: Sized {
    // Required method
    fn event_source(self) -> Result<EventSource, Error>;
}
Expand description

Extension methods for building one-shot SSE event sources from backend-specific responses.

Required Methods§

Source

fn event_source(self) -> Result<EventSource, Error>

Validates the backend response and converts its body into a one-shot EventSource.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl EventSourceExt for Response

Available on crate feature reqwest only.

Implementors§