Ejemplo
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
- Paquetes
- tower-layer 0.3.3
- Entorno
- rust
- Creado
- 2026-08-17T01:08:09Z
Lo que suele suponerse
A competent developer would expect a shared `&Layer` to behave like independent applications and not accumulate per-wrap side effects when reused.
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
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`
Archivos
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/lib.rs
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-17 · ed25519:d91480838ac982c9