3 unstable releases

0.2.1 Jan 7, 2025
0.2.0 Sep 30, 2024
0.1.0 Sep 3, 2024

#2182 in Rust patterns

Download history 741/week @ 2024-10-27 1299/week @ 2024-11-03 884/week @ 2024-11-10 1339/week @ 2024-11-17 1512/week @ 2024-11-24 1377/week @ 2024-12-01 1885/week @ 2024-12-08 1498/week @ 2024-12-15 717/week @ 2024-12-22 670/week @ 2024-12-29 1197/week @ 2025-01-05 1118/week @ 2025-01-12 1154/week @ 2025-01-19 1260/week @ 2025-01-26 1719/week @ 2025-02-02 1620/week @ 2025-02-09

5,823 downloads per month
Used in 53 crates (13 directly)

MIT/Apache

6KB
54 lines

oneshot-fused-workaround

Thin veneer over futures::channel::oneshot to fix use with futures::select!. See futures-rs ticket #2455.

License: MIT OR Apache-2.0


lib.rs:

Thin veneer over futures::channel::oneshot to fix use with select!

A bare futures::channel::oneshot::Receiver doesn't work properly with futures::select!, because it has a broken FusedFuture implementation. (See futures-rs ticket #2455.)

Wrapping it up in a future::Fuse works around this, with a minor performance penalty.

Limitations

The API of this Receiver is rather more limited. For example, it lacks .try_recv().

Dependencies

~0.6–0.8MB
~15K SLoC