Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kixunil/push_decode
Push-based decoding and pull-based encoding - abstract over sync/async!
https://github.com/kixunil/push_decode
Last synced: 2 months ago
JSON representation
Push-based decoding and pull-based encoding - abstract over sync/async!
- Host: GitHub
- URL: https://github.com/kixunil/push_decode
- Owner: Kixunil
- Created: 2023-06-04T10:28:00.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-20T12:56:11.000Z (5 months ago)
- Last Synced: 2024-10-31T05:42:04.409Z (2 months ago)
- Language: Rust
- Size: 69.3 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Push-based decoding
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`.# Features
* `std` - enables integration with the standard library - it's IO and error traits
* `alloc` - enables integration with the standard `alloc` crate
* `lgio` - 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