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
//! The `Runtime` trait.
use fmt;
use Duration;
use crate::;
/// What a polyoxide crate needs of an async runtime: a detached spawn, a
/// sleep, a yield to the host, and a monotonic clock. Everything else in this
/// crate (`spawn`'s `Task`, `timeout`, `Interval`) is built on these, so an
/// implementor writes only these.
///
/// A client takes its runtime from its builder, and falls back to
/// `default_runtime()`; nothing is process-wide.