[][src]Crate ufut

This crate only provides an alias for futures-micro, please visit its repository to say thank you and/or fuck you to its author <3.

Macros

ors

Like [or()], but accepts an arbitrary number of futures rather than just two. Returns the result of the first future to complete; if multiple futures complete at the same time, returns the first one to complete. All of the futures must have the same return type.

pin

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

unwrap_ready

Unwraps Poll<T> or returns Pending.

zips

Like ors, but combines with zip instead of or, only returning when all are completed.

Structs

PollFn

Future for the poll_fn() function.

PollState

Future for the poll_state() function.

Functions

next_poll

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

or

Polls two futures with a left bias until one of them succeeds.

pending

Never complete.

poll_fn

Creates

poll_state

Like poll_fn, but provides mutable access to a state.

ready

Complete on first poll with the provided 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.

zip

Polls two futures until they are both completed.