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
#![doc = include_str!("../README.md")]
use log_to_stdout::init_log_traits;
init_log_traits!();
pub mod poll_fn;
mod timeout;
mod watch;
pub mod handler;
pub mod pinned_future;
pub mod packet;
#[macro_use]
mod plain;
#[cfg(feature = "encrypted")]
mod encrypted;
pub mod client;
pub mod server;
mod error;
pub mod listener;
#[cfg(feature = "basic")]
pub mod basic;
pub mod traits {
use tokio::io::{AsyncRead, AsyncWrite};
pub trait ByteStream: AsyncRead + AsyncWrite + Send + Unpin + 'static {}
impl<T> ByteStream for T
where T: AsyncRead + AsyncWrite + Send + Unpin + 'static {}
}
pub use client::Connection as ClientCon;
pub use server::Connection as ServerCon;
pub use error::StreamError;
pub type Result<T> = std::result::Result<T, StreamError>;