rs-async-utf8-decoder
Incremental UTF8 decoder which convert AsyncRead
into Stream
of futures-rs.
Example
use Cursor;
use Utf8Decoder;
let cur = new;
let mut decoder = new;
async
// Decode full
append.await?;
let decoded = decoder.next.await.unwrap?;
assert_eq!;
// Decode half
append.await?;
let decoded = decoder.next.await.unwrap?;
assert_eq!;
append.await?;
let decoded = decoder.next.await.unwrap?;
assert_eq!;
// Decode char
append.await?;
let decoded = decoder.next.await.unwrap?;
assert_eq!;
append.await?;
let decoded = decoder.next.await.unwrap?;
assert_eq!;
append.await?;
let decoded = decoder.next.await.unwrap?;
assert_eq!;
append.await?;
let decoded = decoder.next.await.unwrap?;
assert_eq!;
License
The code follows MIT license written in LICENSE. Contributors need to agree that any modifications sent in this repository follow the license.