[][src]Struct sync_async_runner::SimpleRunner

pub struct SimpleRunner<F: Future> { /* fields omitted */ }

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]

impl<F: Future> UnsafeUnpin for SimpleRunner<F>[src]

Auto Trait Implementations

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.