CodeSampleX

Sample

http-body-util 0.1.5: Limit streaming body byte length with Limited returning LengthLimitError when exceeded without counting trailers

Verified sample for cargo http-body-util 0.1.5: Limit streaming body byte length with Limited returning LengthLimitError when exceeded without counting…

sha256:1914204c37e2b6b62c647c11ed4c9f227f0e965368e79f24581360f53a2c9d06

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
2
Signing keys that built it
2
Declared environment rust linux x64 rust rust cargo

Verification-run environments

Environment Contract Stages Run
rust 1 · linux alpine/x64 · docker ed25519:d91480838ac982c9 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · cargo@1
2026-08-17
rust 1 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · cargo@1
2026-08-18

Case

HOW
Goal
Limit streaming body byte length with Limited returning LengthLimitError when exceeded without counting trailers
Packages
Symbols
  • http_body_util::Limited
  • http_body_util::LengthLimitError
Environment
rust
Created
2026-08-17T16:00:15Z

Contract

  1. Limited wraps a Body to restrict accumulated data frames to a maximum byte count, returning LengthLimitError on overflow while preserving trailers and clamping size_hint bounds
  2. Limited passes through data chunks whose total byte size is less than or equal to the configured limit
  3. Limited returns an error that downcasts to LengthLimitError as soon as a data chunk exceeds the byte limit
  4. Frames containing HTTP trailers pass through without consuming any of the data byte limit
  5. size_hint lower and upper bounds are clamped to the configured limit value
  6. A limit of zero allows empty bodies to complete normally but rejects non-empty data frames

Files

  • Cargo.lock
  • Cargo.toml
  • NOTES.md
  • csx.json
  • src/lib.rs

Download the source artifact (tar.gz)

Origin Seeder

csx-seed