wrap_stream_sync

Function wrap_stream_sync 

Source
pub fn wrap_stream_sync<S, O, E>(stream: S) -> BoxBodySync
where S: Stream<Item = Result<O, E>> + Send + Sync + 'static, O: Into<Bytes> + 'static, E: Into<Box<dyn StdError + Send + Sync>> + 'static,
Expand description

Wrap a stream of byte chunks into a BoxBodySync.

This is the thread-safe variant of wrap_stream, used for event streaming operations that require Sync bounds, such as lambda handlers.

The stream should produce Result<O, E> where O can be converted into Bytes and E can be converted into an error.