1use rama_core::{
6 extensions::ExtensionsRef,
7 futures::{Sink, Stream},
8};
9
10use crate::{Message, ProtocolError};
11
12mod compat;
13mod handshake;
14mod stream;
15
16pub use stream::AsyncWebSocket;
17
18pub trait WebSocketIo:
25 Stream<Item = Result<Message, ProtocolError>>
26 + Sink<Message, Error = ProtocolError>
27 + ExtensionsRef
28 + Send
29 + Unpin
30 + 'static
31{
32}
33
34impl<T> WebSocketIo for T where
35 T: Stream<Item = Result<Message, ProtocolError>>
36 + Sink<Message, Error = ProtocolError>
37 + ExtensionsRef
38 + Send
39 + Unpin
40 + 'static
41{
42}