Crate async_bincode [] [src]

Asynchronous access to a bincode-encoded item stream.

This crate enables you to asynchronously read from a bincode-encoded stream. bincode does not support this natively, as it cannot easily resume from stream errors while decoding (https://github.com/TyOverby/bincode/issues/229). This crate works around that issue 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.

Structs

AsyncBincodeReader

An wrapper around an asynchronous reader that produces an asynchronous stream of bincode-decoded values.

Functions

serialize_into

Serializes an object directly into a Writer using the default configuration.