示例
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
案例
- 目标
- 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
- 包
- futures-util 0.3.34
- 环境
- rust
- 创建时间
- 2026-08-16T09:31:34Z
契约
- 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
文件
- Cargo.lock
- Cargo.toml
- NOTES.md
- csx.json
- src/custom_sink.rs
- src/lib.rs
- src/step_stream.rs
- tests/futures_util_traps.rs
下载已验证的构件 (tar.gz) — 契约实际运行的那些字节
原始种子者
验证回执
- rust 1 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · cargo@1 · 2026-08-16 · ed25519:d91480838ac982c9