├── .travis.yml ├── src ├── reactor.rs └── lib.rs ├── .gitignore ├── Cargo.toml └── README.md /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | -------------------------------------------------------------------------------- /src/reactor.rs: -------------------------------------------------------------------------------- 1 | use {EventMachine, MioEvent}; 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *~ 3 | *# 4 | *.o 5 | *.so 6 | *.swp 7 | *.dylib 8 | *.dSYM 9 | *.dll 10 | *.rlib 11 | *.dummy 12 | *.exe 13 | *-test 14 | /doc/ 15 | /target/ 16 | /examples/* 17 | !/examples/*.rs 18 | Cargo.lock 19 | 20 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | 3 | name = "aio" 4 | version = "0.0.1" 5 | authors = ["Jonathan Reem "] 6 | repository = "https://github.com/reem/rust-aio.git" 7 | description = "Lightweight nonblocking io and eventing framework." 8 | readme = "README.md" 9 | license = "MIT" 10 | 11 | [dependencies.mio] 12 | git = "https://github.com/carllerche/mio" 13 | 14 | [dependencies] 15 | log = "*" 16 | 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # aio 2 | 3 | > Lightweight framework for nonblocking io and general eventing. 4 | 5 | ## Usage 6 | 7 | Use the crates.io repository; add this to your `Cargo.toml` along 8 | with the rest of your dependencies: 9 | 10 | ```toml 11 | [dependencies] 12 | aio = "*" 13 | ``` 14 | 15 | ## Author 16 | 17 | [Jonathan Reem](https://medium.com/@jreem) is the primary author and maintainer of aio. 18 | 19 | ## License 20 | 21 | MIT 22 | 23 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![cfg_attr(test, deny(warnings))] 2 | // #![deny(missing_docs)] 3 | 4 | //! # aio 5 | //! 6 | //! 7 | 8 | extern crate mio; 9 | 10 | use std::io; 11 | 12 | use mio::{EventLoop, Token, EventSet}; 13 | use mio::util::Slab; 14 | 15 | pub trait EventMachine> { 16 | type Event; 17 | 18 | mod reactor; 19 | 20 | pub trait Source> { 21 | type Event; 22 | type Error; 23 | 24 | fn feed(&mut self, machine: E) -> Result<(), Self::Error>; 25 | } 26 | --------------------------------------------------------------------------------