[][src]Crate tiny_future

Macros

job_die

Cancels $future and returns

job_return

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

Structs

Future

A future result with an optional shared state

Enums

State

A future's state

Functions

run_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.

run_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