Expand description
Asynchronous access to a Transmog-encoded item stream.
This crate enables you to asynchronously read from a Transmog-encoded stream, or write transmog-encoded values. Most serialization format do not natively support serializing and deserializing in an asynchronous environment.
Transmog 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 the underlying Format
. To make this work, it relies on the
sender to prefix each encoded element with its encoded size.
On the write side, Transmog buffers the serialized values, and asynchronously sends the resulting bytestream.
This crate has been adapted from
async-bincode
to generically
support the Format
trait.
Re-exports§
pub use transmog;
Structs§
- Async
Destination - A marker that indicates that the wrapping type is compatible with
TransmogReader
. - Builder
- Builder helper to specify types without the need of turbofishing.
- Sync
Destination - A marker that indicates that the wrapping type is compatible with stock Transmog receivers.
- Transmog
Reader - A wrapper around an asynchronous reader that produces an asynchronous stream of Transmog-decoded values.
- Transmog
Stream - A wrapper around an asynchronous stream that receives and sends bincode-encoded values.
- Transmog
Writer - A wrapper around an asynchronous sink that accepts, serializes, and sends Transmog-encoded values.
Type Aliases§
- Transmog
Tokio TcpReader - A reader of Transmog-encoded data from a
TcpStream
. - Transmog
Tokio TcpWriter - A writer of Transmog-encoded data to a
TcpStream
.