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
69
70
71
72
73
74
75
76
77
#![ cfg_attr( feature = "external_doc", feature(external_doc) ) ]
#![ cfg_attr( feature = "external_doc", doc(include = "../README.md") ) ]
#![ doc ( html_root_url = "https://docs.rs/ws_stream_tungstenite" ) ]
#![ deny ( missing_docs ) ]
#![ forbid ( unsafe_code ) ]
#![ allow ( clippy::suspicious_else_formatting ) ]
#![ warn
(
missing_debug_implementations ,
missing_docs ,
nonstandard_style ,
rust_2018_idioms ,
trivial_casts ,
trivial_numeric_casts ,
unused_extern_crates ,
unused_qualifications ,
single_use_lifetimes ,
unreachable_pub ,
variant_size_differences ,
)]
mod ws_stream ;
mod ws_event ;
mod error ;
pub(crate) mod tung_websocket;
pub use
{
self::ws_stream :: { WsStream } ,
self::ws_event :: { WsEvent } ,
self::error :: { Error, ErrorKind } ,
};
mod import
{
pub(crate) use
{
bitflags :: { bitflags } ,
futures_01 :: { stream::{ SplitStream as SplitStream01, SplitSink as SplitSink01, Stream as Stream01 } } ,
futures::compat :: { Compat01As03, Compat01As03Sink } ,
futures :: { prelude::{ Stream, Sink, AsyncRead, AsyncWrite }, ready } ,
log :: { trace, debug, error, warn } ,
std :: { io::{ self }, pin::Pin, fmt, borrow::Cow, error::Error as ErrorTrait, ops::Deref, collections::VecDeque, sync::Arc, task::{ Context, Poll } } ,
tokio :: { io::{ AsyncRead as AsyncRead01, AsyncWrite as AsyncWrite01 } } ,
tokio_tungstenite :: { WebSocketStream as TTungSocket } ,
tungstenite :: { Message as TungMessage, Error as TungErr, protocol::{ CloseFrame, frame::coding::CloseCode } } ,
pharos :: { Observable, ObserveConfig, Events, Pharos } ,
};
#[ cfg( test ) ]
pub(crate) use
{
futures :: { executor::block_on, StreamExt, SinkExt } ,
futures_test :: { task::noop_waker } ,
pharos :: { Channel } ,
assert_matches :: { assert_matches } ,
endpoint :: { Endpoint } ,
futures :: { future::{ join }, compat::Sink01CompatExt } ,
futures::compat :: { Stream01CompatExt } ,
tokio_tungstenite :: { WebSocketStream } ,
tungstenite :: { protocol::{ Role } } ,
log :: { * } ,
};
}