25 releases

0.7.0 May 8, 2022
0.6.1 Feb 25, 2021
0.5.1 Nov 27, 2019
0.4.9 Dec 6, 2018
0.4.5 Jul 9, 2018

#152 in Asynchronous

Download history 758/week @ 2022-10-16 2646/week @ 2022-10-23 2204/week @ 2022-10-30 1642/week @ 2022-11-06 2470/week @ 2022-11-13 1052/week @ 2022-11-20 1560/week @ 2022-11-27 2153/week @ 2022-12-04 1698/week @ 2022-12-11 1897/week @ 2022-12-18 378/week @ 2022-12-25 682/week @ 2023-01-01 486/week @ 2023-01-08 540/week @ 2023-01-15 679/week @ 2023-01-22 1139/week @ 2023-01-29

2,880 downloads per month
Used in 10 crates (7 directly)

MIT/Apache

33KB
582 lines

async-bincode

Crates.io Documentation

Asynchronous access to a bincode-encoded item stream.

This crate enables you to asynchronously read from a bincode-encoded stream, or write bincoded-encoded values. bincode does not support this natively, as it cannot easily resume from stream errors while encoding or decoding.

async-bincode works around that on the receive side by buffering received bytes until a full element's worth of data has been received, and only then calling into bincode. To make this work, it relies on the sender to prefix each encoded element with its encoded size. See [serialize_into] for a convenience method that provides this.

On the write side, async-bincode buffers the serialized values, and asynchronously sends the resulting bytestream.

Dependencies

~2.7–7.5MB
~113K SLoC