Function unwrap_waker

pub async fn unwrap_waker<Fut>(future: Fut) -> <Fut as Future>::Output
where Fut: Future,
Expand description

Unwrap the waker

This is an escape hatch if a library depends on a similar hack we do, where we wrap the waker in a struct to store additional data.

An example is the embassy crate.

ยงPanics

The future will panic if the waker is not found. This happens if you use this function outside of the context of a stream generator.