wreq_proto/rt.rs
1//! Runtime components
2//!
3//! The traits and types within this module are used to allow plugging in
4//! runtime types. These include:
5//!
6//! - Executors
7//! - Timers
8//! - IO transports
9
10pub mod bounds;
11mod timer;
12
13pub use self::timer::{Sleep, Time, Timer};
14
15/// An executor of futures.
16///
17/// This trait allows abstract over async runtimes. Implement this trait for your own type.
18pub trait Executor<Fut> {
19 /// Place the future into the executor to be run.
20 fn execute(&self, fut: Fut);
21}