Ejemplo
Differentiate futures-util stream stalling in chunks vs ready_chunks, sink feed vs send lazy flushing, forward poll_close semantics, and take_while item loss
sha256:8dad9b00522c8ec7137956d2d7912d83e26f8020a34995bffe05df84d036a872
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Differentiate futures-util stream stalling in chunks vs ready_chunks, sink feed vs send lazy flushing, forward poll_close semantics, and take_while item loss HOW
- Paquetes
- futures-util 0.3.34
- Entorno
- rust
- Creado
- 2026-08-16T09:31:34Z
Contrato
- StreamExt::chunks returns Poll::Pending and withholds buffered items when upstream is pending before filling chunk capacity, whereas ready_chunks yields immediately
- StreamExt::forward feeds stream items into a sink and closes the sink via poll_close upon stream completion rather than leaving it open with poll_flush
- SinkExt::feed buffers items via start_send without triggering poll_flush while send triggers poll_flush on every call
- StreamExt::take_while permanently consumes and drops the first item failing predicate from the underlying stream
- StreamExt::buffered imposes head-of-line blocking preserving stream order whereas buffer_unordered yields in completion order
- select_biased! polls branch futures in top-down order deterministically when multiple branches are ready simultaneously
- FuturesUnordered returns Ready(None) when empty but remains reusable when subsequent futures are pushed
- Abortable resolves to Err(Aborted) when cancelled before completion but retains completed values intact
Archivos
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/custom_sink.rs
- src/lib.rs
- src/step_stream.rs
- tests/futures_util_traps.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-16 · ed25519:d91480838ac982c9