pub struct SimpleRunner<F: Future> { /* private fields */ }
Expand description
The not-actually-async async runner.
Wraps a future and provides a method to run it on the current thread.
Implementations§
Source§impl<F: Future> SimpleRunner<F>
impl<F: Future> SimpleRunner<F>
Sourcepub fn is_awake(&self) -> bool
pub fn is_awake(&self) -> bool
Has a waker been activated for this future?
For example, this will be true if the future was waiting on a channel to have an element for it to receive and the channel now has one.
You can run an unawakened future, but it will likely just result in it awaiting without making any progress.
Trait Implementations§
impl<'pin, F: Future> Unpin for SimpleRunner<F>where
__SimpleRunner<'pin, F>: Unpin,
impl<F: Future> UnsafeUnpin for SimpleRunner<F>
Auto Trait Implementations§
impl<F> Freeze for SimpleRunner<F>where
F: Freeze,
impl<F> RefUnwindSafe for SimpleRunner<F>where
F: RefUnwindSafe,
impl<F> Send for SimpleRunner<F>where
F: Send,
impl<F> Sync for SimpleRunner<F>where
F: Sync,
impl<F> UnwindSafe for SimpleRunner<F>where
F: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more