1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! Minimal and simpler alternative to the futures crate.
//!
//! # Optional Features
//! Only the _`std`_ feature is enabled by default
//!
//! - Disable _`std`_ to use pasts without the standard library.
//! - Enable _`web`_ to use pasts within the javascript DOM.
//!
//! # Getting Started
//!
//! Add the following to your **`./Cargo.toml`**:
//! ```toml
//! [dependencies]
//! pasts = "0.14"
//!
//! ## This example uses async_main for convenience, but it is *not* required to
//! ## use pasts.
//! async_main = { version = "0.4", features = ["pasts"] }
//!
//! ## This example uses async-std for a sleep future, but async-std is *not*
//! ## required to use pasts.
//! async-std = "1.12"
//!
//! ## Also not required for pasts, but allows for portability with WebAssembly
//! ## in the browser.
//! [features]
//! web = ["async_main/web", "pasts/web"]
//! ```
//!
//! ## Multi-Tasking On Multiple Iterators of Futures
//! This example runs two timers in parallel using the `async-std` crate
//! counting from 0 to 6. The "one" task will always be run for count 6 and
//! stop the program, although which task will run for count 5 may be either
//! "one" or "two" because they trigger at the same time.
//!
//! ```rust,no_run
//! ```
extern crate alloc;
use *;
pub use ;