[][src]Crate futures_micro

A very small, no-std compatible toolbox of async utilities.

Re-exports

pub use core::future::Future;
pub use core::pin::Pin;
pub use core::task::Context;
pub use core::task::Poll;
pub use core::task::Waker;

Modules

prelude

This module has extras that clash with names in [futures-lite], which depends on us.

Macros

or

Polls arbitrarily many futures, returning the first ready value.

pin

Pins a variable of type T on the stack and rebinds it as Pin<&mut T>.

ready

Unwraps Poll<T> or returns Pending.

zip

Zips arbitrarily many futures, waiting for all to complete.

Structs

Or

Returns the result of left or right future, preferring left if both are ready.

Pending

Future for the pending() function.

PollFn

Future for the poll_fn() function.

PollState

Future for the poll_state() function.

Ready

A future that resolves to the provided value.

Zip

Waits for two Futures to complete, returning both results.

Functions

next_poll

Polls a future once. If it does not succeed, return it to try again

pending

Creates a future that is always pending.

poll_fn

Creates a future from a function returning Poll.

poll_state

Creates a future from a function returning Poll that has access to a provided state value.

sleep

Goes to sleep until woken by its Waker being called.

waker

Get the Waker inside an async fn where you aren't supposed to have it.

yield_once

Pushes itself to the back of the executor queue so some other tasks can do some work.