Commit 7f69689
committed
f - Expose an async / Future-based async receive offer API
Replace the blocking `await_async_receive_offer(Duration)` with an
`async fn await_async_receive_offer(&self) -> Result<Offer, ()>` and a
new `get_async_receive_offer_ready_future() -> Future` helper.
Async callers can `.await` the offer directly; synchronous callers can
fetch the underlying [`Future`] and call `wait_timeout` on it, which
lets them combine with whatever timing primitive their runtime
provides.
Co-Authored-By: HAL 90001 parent 2d7e835 commit 7f69689
2 files changed
Lines changed: 32 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5884 | 5884 | | |
5885 | 5885 | | |
5886 | 5886 | | |
5887 | | - | |
5888 | | - | |
| 5887 | + | |
| 5888 | + | |
| 5889 | + | |
| 5890 | + | |
| 5891 | + | |
| 5892 | + | |
| 5893 | + | |
| 5894 | + | |
| 5895 | + | |
5889 | 5896 | | |
5890 | | - | |
| 5897 | + | |
5891 | 5898 | | |
5892 | 5899 | | |
5893 | 5900 | | |
5894 | 5901 | | |
5895 | | - | |
5896 | | - | |
5897 | | - | |
5898 | | - | |
| 5902 | + | |
5899 | 5903 | | |
5900 | 5904 | | |
5901 | 5905 | | |
| 5906 | + | |
| 5907 | + | |
| 5908 | + | |
| 5909 | + | |
| 5910 | + | |
| 5911 | + | |
| 5912 | + | |
| 5913 | + | |
| 5914 | + | |
| 5915 | + | |
| 5916 | + | |
5902 | 5917 | | |
5903 | 5918 | | |
5904 | 5919 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
1719 | 1721 | | |
1720 | 1722 | | |
1721 | 1723 | | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
1722 | 1730 | | |
1723 | | - | |
1724 | | - | |
| 1731 | + | |
| 1732 | + | |
1725 | 1733 | | |
1726 | 1734 | | |
1727 | 1735 | | |
| |||
0 commit comments