axum streams for Rust
Library provides HTTP response streaming support for axum web framework:
- JSON array stream format
- JSON lines stream format
- CSV stream
- Protobuf len-prefixed stream format
This type of responses are useful when you are reading huge stream of objects from some source (such as database, file, etc) and want to avoid huge memory allocations to store on the server side.
Quick start
Cargo.toml:
[]
= { = "0.4", =["json", "csv", "protobuf"] }
Example code:
async
async
async
All examples available at examples directory.
To run example use:
# cargo run --example json-example
Need client support?
There are the same functionality for:
Licence
Apache Software License (ASL)
Author
Abdulla Abdurakhmanov