futures_test::task

Function panic_waker

source
pub fn panic_waker() -> Waker
Expand description

Create a new Waker which will panic when wake() is called on it. The Waker can be converted into a Waker which will behave the same way.

§Examples

use futures_test::task::panic_waker;

let waker = panic_waker();
waker.wake(); // Will panic