Crate tiny_future[][src]

Macros

job_die

Cancels $future and returns

job_return

Sets $result as the $future's result and returns

Structs

Future

Enums

State

Functions

async

Creates a future for job and runs job. The result of job will be set as result into the future. The parameter passed to job is a function that returns if the future is still waiting so that job can check for cancellation.

async_with_state

Creates a future for job and runs job. The result of job will be set as result into the future. The parameter passed to job is a function that returns if the future is still waiting so that job can check for cancellation.

time_remaining

Computes the remaining time underflow-safe