Crates.io | push_decode |
lib.rs | push_decode |
version | 0.4.3 |
source | src |
created_at | 2023-06-04 10:25:59.626414 |
updated_at | 2024-01-22 10:34:13.49619 |
description | Push-based decoding and pull-based encoding |
homepage | |
repository | https://github.com/Kixunil/push_decode |
max_upload_size | |
id | 882095 |
size | 75,851 |
This crate provides abstractions for push-based decoding and pull-based encoding. That means, the caller is responsible for obtaining the bytes to decode and feeding them into decoder or pulling bytes from encoder and feeding them into writr.
The main advantage of this approach is that it's IO-agnostic, which implies both
async
-agnostic and no_std
. You can use the same code to deserialize from sync
and async
readers and only need a tiny piece of code to connect the reader to a decoder. This
piece of code is provided by this crate for std
, [lgio
] (usable with no_std
), tokio
, futures
and async-std
.
std
- enables integration with the standard library - it's IO and error traitsalloc
- enables integration with the standard alloc
cratelgio
- connects decoders to lgio IO.tokio
- connects decoders to Tokio IO.async-std
- connects decoders to async-std IO.futures_0_3
- connects decoders to futures 0.3.x IO