3 releases (stable)
1.0.1 | Jul 16, 2023 |
---|---|
0.1.0 | Jul 16, 2023 |
#24 in #message-pack
15KB
97 lines
Send objects through streams
This library adds SerdeRead and SerdeWrite, traits that allow you to quickly send serializable enums and structs over streams, both for std and tokio variants.
It uses MessagePack (https://crates.io/crates/rmp-serde) for both serialization and deserialization. Before sending the serialized data, it sends the amount of bytes that will be sent.
lib.rs
:
This library adds SerdeRead and SerdeWrite, both for [std
] and tokio
variants.
- std (only with the
std
flag):std_stream
- tokio (only with the
tokio
flag):tokio_stream
For both implementations, use the full
flag.
It uses MessagePack (https://crates.io/crates/rmp-serde) for both serialization and deserialization.
Before sending the serialized data, it sends the amount of bytes that will be sent.
Dependencies
~0.7–7MB
~49K SLoC