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
#![doc(html_root_url = "https://docs.rs/fumio/0.1.0")]
#![warn(
missing_debug_implementations,
missing_docs,
nonstandard_style,
rust_2018_idioms,
clippy::pedantic,
clippy::nursery,
clippy::cargo,
)]
#![allow(
clippy::module_name_repetitions,
clippy::if_not_else,
clippy::multiple_crate_versions,
)]
pub use fumio_reactor::reactor as reactor;
pub use fumio_reactor::net as net;
pub mod pool {
pub use fumio_pool::{
LocalPool,
LocalSpawner,
current_local,
};
}
pub mod timer {
pub use tokio_timer::{
Delay,
DelayQueue,
Interval,
Timeout,
};
}
mod runtime;
pub use self::runtime::{Handle, Runtime};
mod timer_reactor;
use std::future::Future;
pub fn run<F, T>(future: F) -> T
where
F: Future<Output = T>,
{
let mut runtime = Runtime::new().unwrap();
runtime.run_until(future)
}