Skip to main content

Eventsource

Trait Eventsource 

Source
pub trait Eventsource: Sized {
    // Required method
    fn eventsource(self) -> EventStream<Self>;
}
Expand description

Main entrypoint for creating crate::Event streams

Required Methods§

Source

fn eventsource(self) -> EventStream<Self>

Create an event stream from a stream of bytes

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<S, B, E> Eventsource for S
where S: Stream<Item = Result<B, E>>, B: AsRef<[u8]>,