Skip to main content

decode_events

Function decode_events 

Source
pub fn decode_events<S, B, E>(chunks: S) -> impl Stream<Item = Result<Event>>
where S: Stream<Item = Result<B, E>>, B: AsRef<[u8]>, E: Error + Send + Sync + 'static,
Expand description

Decodes a stream of byte chunks into a stream of events.

This is the adapter between a transport’s body stream and the rest of the crate. Unknown additions are dropped, while malformed known fields and framing errors end the stream with an error item.