byteorder_async

Crates.iobyteorder_async
lib.rsbyteorder_async
version1.2.0
sourcesrc
created_at2020-04-22 14:01:25.507894
updated_at2020-04-25 00:07:41.645323
descriptionLibrary for reading/writing numbers in big-endian and little-endian asynchronously.
homepagehttps://github.com/pigeonhands/byteorder_async
repositoryhttps://github.com/pigeonhands/byteorder_async
max_upload_size
id232944
size247,549
Sam (pigeonhands)

documentation

https://docs.rs/byteorder

README

byteorder - async

This is a fork of byteorder with the addition of:

  • Using modern rust for try (? rather than try!)
  • support for tokio::io
  • support for futures::io

Installation

for futures::io

byteorder_async = {version="1.2.0", features=["futures_async"] }

for tokio::io

byteorder_async = {version="1.2.0", features=["tokio_async"] }

Basic async usage:

use byteorder_async::ReaderToByteOrder;

let reader : io::AsyncRead = ...;
// after the byte_order its the same calls.
let byte = reader.byte_order().read_u8().await;

Note: Thre reason for the byte_order() call is because async fn is not supprted in traits yet.

Commit count: 234

cargo fmt