pub struct WakeCounter { /* fields omitted */ }
An implementation of Wake
that tracks how many
times it has been woken.
#![feature(futures_api)]
use futures_test::task::WakeCounter;
let wake_counter = WakeCounter::new();
let lw = wake_counter.local_waker();
assert_eq!(wake_counter.count(), 0);
lw.wake();
lw.wake();
assert_eq!(wake_counter.count(), 2);
Get the number of times this WakeCounter
has been woken
Returns the "default value" for a type. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)