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
63
64
65
66
67
68
#![deny(missing_docs, missing_debug_implementations, warnings)]
#![doc(html_root_url = "https://docs.rs/tokio-io/0.1.9")]
#[macro_use]
extern crate log;
#[macro_use]
extern crate futures;
extern crate bytes;
use std::io as std_io;
use futures::{Future, Stream};
pub type IoFuture<T> = Box<Future<Item = T, Error = std_io::Error> + Send>;
pub type IoStream<T> = Box<Stream<Item = T, Error = std_io::Error> + Send>;
#[macro_export]
macro_rules! try_nb {
($e:expr) => (match $e {
Ok(t) => t,
Err(ref e) if e.kind() == ::std::io::ErrorKind::WouldBlock => {
return Ok(::futures::Async::NotReady)
}
Err(e) => return Err(e.into()),
})
}
pub mod io;
pub mod codec;
mod allow_std;
mod async_read;
mod async_write;
mod framed;
mod framed_read;
mod framed_write;
mod length_delimited;
mod lines;
mod split;
mod window;
pub mod _tokio_codec;
pub use self::async_read::AsyncRead;
pub use self::async_write::AsyncWrite;
fn _assert_objects() {
fn _assert<T>() {}
_assert::<Box<AsyncRead>>();
_assert::<Box<AsyncWrite>>();
}