uhttp_transfer_encoding 0.5.0

Iterator/slice-based parser for HTTP transfer-encoding header
Documentation
  • Coverage
  • 100%
    11 out of 11 items documented1 out of 5 items with examples
  • Size
  • Source code size: 8.66 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.87 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • kchmck/uhttp_transfer_encoding.rs
    0 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • kchmck

This crate provides a zero-allocation, iterator/slice-based parser for extracting transfer encoding types as they appear in the Transfer-Encoding request header. Standard encodings are extracted as enum values, and unknown encodings are extracted as slices for further processing.

Example

use uhttp_transfer_encoding::{transfer_encodings, TransferEncoding, StdTransferEncoding};

let mut encs = transfer_encodings(" gzip, custom-enc, chunked");
assert_eq!(encs.next(), Some(TransferEncoding::Std(StdTransferEncoding::Chunked)));
assert_eq!(encs.next(), Some(TransferEncoding::Other("custom-enc")));
assert_eq!(encs.next(), Some(TransferEncoding::Std(StdTransferEncoding::Gzip)));
assert_eq!(encs.next(), None);