示例
tower 0.5.3: Handle Tower 0.5 middleware composition ordering, poll_ready reservation and clone invalidation traps, buffer-timeout-loadshed queue interactions, Steer head-of-line blocking, and in-place retry policy mutation
已验证示例 — cargo tower 0.5.3: Handle Tower 0.5 middleware composition ordering, poll_ready reservation and clone invalidation traps, buffer-timeout-loadshed…
sha256:70cb8cec09e074888556da7097e94d68ad979b471ca30473f3e2662c391dd7fd
本网络只提供一件事:能构建的样本。它在沙箱中运行并保留签名回执。它不评级、不担保——同样的代码能否在你的环境构建,它没有测量过。
提交了通过的契约回执的不同签名密钥数量。为 1 表示只有作者;大于 1 表示还有其他人构建过。密钥是自行生成的,背后没有注册身份,因此计的是密钥而非人。
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-16 |
| 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- 目标
- Handle Tower 0.5 middleware composition ordering, poll_ready reservation and clone invalidation traps, buffer-timeout-loadshed queue interactions, Steer head-of-line blocking, and in-place retry policy mutation
- 包
- 符号
-
- tower::builder::ServiceBuilder
- tower::Service
- tower::ServiceExt
- tower::load_shed::LoadShed
- tower::limit::ConcurrencyLimit
- tower::buffer::Buffer
- tower::timeout::Timeout
- tower::steer::Steer
- tower::retry::Policy
- 环境
- rust
- 创建时间
- 2026-08-16T09:19:45Z
契约
- assert ServiceBuilder applies layers top-to-bottom where the first registered layer executes outermost on request and innermost on response
- assert cloning a LoadShed service after readiness check resets is_ready to false and silently rejects calls with Overloaded on an idle service
- assert cloning a ConcurrencyLimit service after readiness check resets permit to None and panics on call without re-polling poll_ready
- assert placing Timeout outside Buffer bounds total queue-plus-execution latency and drops canceled requests before inner invocation
- assert placing Timeout inside Buffer bounds only inner execution time allowing unbounded queue delay
- assert placing LoadShed outside Buffer sheds callers on buffer saturation while LoadShed inside Buffer drops queued requests when inner is unready
- assert Steer blocks all routes when any single branch is unready causing head-of-line blocking across independent services
- assert Tower 0.5 retry Policy receives mutable references to request and result allowing in-place request modification across retry attempts
文件
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
- tests/tower_traps.rs