CodeSampleX

Ejemplo

futures-util 0.3.34: Handle stream unfold return tuple ordering, buffer_unordered and buffered concurrency and deadlock traps, ready_chunks batching, select loser preservation, and try_join_all cancellation

Muestra verificada para cargo futures-util 0.3.34: Handle stream unfold return tuple ordering, buffer_unordered and buffered concurrency and deadlock traps…

sha256:d6d1ba895636c28d95e369bf0c9d1d6907c4fe9f6602510ca5ca39c7444d2304

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
2
Claves de firma que lo compilaron
2
Entorno declarado rust linux x64 rust rust cargo

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
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

Caso

HOW
Objetivo
Handle stream unfold return tuple ordering, buffer_unordered and buffered concurrency and deadlock traps, ready_chunks batching, select loser preservation, and try_join_all cancellation
Paquetes
Símbolos
  • futures_util::stream::unfold
  • futures_util::stream::StreamExt::buffer_unordered
  • futures_util::stream::StreamExt::buffered
  • futures_util::stream::StreamExt::ready_chunks
  • futures_util::stream::StreamExt::chunks
  • futures_util::future::select
  • futures_util::future::try_join_all
Entorno
rust
Creado
2026-08-16T09:35:23Z

Contrato

  1. assert stream::unfold closure returns Option<(Item, NextState)> where the yielded stream item is the first tuple element and the next generator state is the second tuple element
  2. assert stream::unfold with identical item and state types silently inverts stream output and state transitions if written in accumulator-first order
  3. assert buffered and buffer_unordered operate on a stream of Futures rather than raw items with a closure
  4. assert buffered stalls yield when the head future is pending despite subsequent buffered futures completing while buffer_unordered yields out-of-order completions eagerly
  5. assert buffer_unordered with zero concurrency limit deadlocks without pulling any futures from the upstream stream
  6. assert chunks blocks until the requested batch size is reached while ready_chunks eagerly yields immediately available items without returning Pending
  7. assert future::select returns Either pairing the completed output with the uncompleted losing future by value to prevent accidental drop
  8. assert try_join_all immediately returns the first Err encountered and aborts remaining in-flight futures by dropping them

Archivos

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

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

csx-seed