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
//! The mio-based framework for doing I/O in a simple and composable way.
//!
//! You may want to look at [the guide](http://rotor.readthedocs.org).

#![crate_name="rotor"]

pub extern crate void as void_original;
pub extern crate mio as mio_original;
pub extern crate slab;
#[macro_use] extern crate log;
#[macro_use] extern crate quick_error;

mod handler;
mod scope;
mod loop_api;
mod response;
mod compose;
mod macros;
mod machine;
mod notify;
mod config;
mod creator;
mod error;
mod loop_time;

pub use machine::Machine;
pub use scope::{Scope, EarlyScope, GenericScope};
pub use scope::{scope as _scope, early_scope as _early_scope};
pub use notify::{Notifier, WakeupError};
pub use config::Config;
pub use creator::{LoopCreator as Loop, LoopInstance};
pub use error::SpawnError;
pub use loop_time::Time;
pub use handler::{Timeo as _Timeo, Notify as _Notify};
pub use loop_api::{LoopApi as _LoopApi};

pub use compose::{Compose2};

// Re-export mio types used in rotor
pub use mio::{Ready as EventSet, Evented, PollOpt};
pub use mio::timer::{Timeout, TimerError};
pub use mio_original as mio;
// Re-export void too
pub use void::{Void};
pub use void_original as void;

/// Slab
pub type Slab<T> = slab::Slab<T, mio::Token>;

/// The response of a state machine to the (mio) action
///
/// This value is returned by many methods of the `Machine` trait.
pub struct Response<M, N>(response::ResponseImpl<M, N>);