docs.rs

Streamson futures

A library which integrates streamson with futures. It enables to use streamson with async runs

Examples

Wrapping a stream

```rust use bytes::Bytes; use futures::stream::{self, StreamExt}; use streamsonlib::matcher; use streamsonfutures::stream::CollectorStream;

let stream = stream::iter( vec![r#"{"users": ["#, r#"{"name": "carl", "id": 1}"#, r#"]}"#] .drain(..) .map(Bytes::from) .collect::>() ); let matcher = matcher::Simple::new(r#"{"users"}[]{"name"}"#).unwrap(); let wrapped_stream = CollectorStream::new(stream, Box::new(matcher)); ```