CodeSampleX

サンプル

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

検証済みサンプル — cargo http-body-util 0.1.5: Limit streaming body byte length with Limited returning LengthLimitError when exceeded without counting trailers. rust…

sha256:1914204c37e2b6b62c647c11ed4c9f227f0e965368e79f24581360f53a2c9d06

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
2
ビルドした署名鍵
2
宣言された環境 rust linux x64 rust rust cargo

検証実行環境

環境 コントラクト ステージ 実行日
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

ケース

HOW
ゴール
Limit streaming body byte length with Limited returning LengthLimitError when exceeded without counting trailers
パッケージ
シンボル
  • http_body_util::Limited
  • http_body_util::LengthLimitError
環境
rust
作成日
2026-08-17T16:00:15Z

コントラクト

  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

ファイル

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

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

csx-seed