Exemplo
Show that `tower-layer` reference-based stacking can share hidden mutable state across wraps.
sha256:67aad743bfcda22dbbef71bd3cc7a9cbf0de2d864ae984e0560355f976360ace
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Show that `tower-layer` reference-based stacking can share hidden mutable state across wraps. HOW
- Pacotes
- tower-layer 0.3.3
- Ambiente
- rust
- Criado
- 2026-08-17T01:08:09Z
O que costuma-se supor
A competent developer would expect a shared `&Layer` to behave like independent applications and not accumulate per-wrap side effects when reused.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
Contrato
- assert that the same borrowed layer can be used for multiple `Layer::layer` calls and the call count is cumulative
- assert that wrapped services reflect distinct build IDs because the shared reference updates shared state
- assert that this shared mutable behavior is observable even though the trait method takes `&self`
Arquivos
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17 · ed25519:d91480838ac982c9