[−][src]Struct sync_async_runner::SimpleRunner
The not-actually-async async runner.
Wraps a future and provides a method to run it on the current thread.
Implementations
impl<F: Future> SimpleRunner<F>
[src]
pub fn is_awake(&self) -> bool
[src]
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.
pub fn poll(self: Pin<&mut Self>) -> Poll<F::Output>
[src]
Resumes the future, running it on the current thread until it awaits or returns.
Returns whether the future has completed or not.
Trait Implementations
impl<F: Future> PinnedDrop for SimpleRunner<F>
[src]
impl<'pin, F: Future> Unpin for SimpleRunner<F> where
__SimpleRunner<'pin, F>: Unpin,
[src]
__SimpleRunner<'pin, F>: Unpin,
impl<F: Future> UnsafeUnpin for SimpleRunner<F>
[src]
Auto Trait Implementations
impl<F> RefUnwindSafe for SimpleRunner<F> where
F: RefUnwindSafe,
F: RefUnwindSafe,
impl<F> Send for SimpleRunner<F> where
F: Send,
F: Send,
impl<F> Sync for SimpleRunner<F> where
F: Sync,
F: Sync,
impl<F> UnwindSafe for SimpleRunner<F> where
F: UnwindSafe,
F: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,