axum-range

HTTP range responses for axum.

Documentation.

MIT license.

Example usage

```rust use axum::TypedHeader; use axum::headers::Range;

use tokio::fs::File;

use axumrange::Ranged; use axumrange::KnownSize;

async fn file(range: Option>) -> Ranged> { let file = File::open("archlinux-x86_64.iso").await.unwrap(); let body = KnownSize::file(file).await.unwrap(); let range = range.map(|TypedHeader(range)| range); Ranged::new(range, body) } ```