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
use crate::AsyncSocket;
use crate::ImplInfo;
pub trait TlsStreamDyn: AsyncSocket {
fn get_alpn_protocol(&self) -> crate::Result<Option<Vec<u8>>>;
fn impl_info(&self) -> ImplInfo;
fn get_socket_dyn_mut(&mut self) -> &mut dyn AsyncSocket;
fn get_socket_dyn_ref(&self) -> &dyn AsyncSocket;
}
pub trait TlsStreamWithSocketDyn<S>: TlsStreamDyn {
fn get_socket_mut(&mut self) -> &mut S;
fn get_socket_ref(&self) -> &S;
}
pub trait TlsStreamWithUpcastDyn<S>: TlsStreamWithSocketDyn<S> {
fn upcast_box(self: Box<Self>) -> Box<dyn TlsStreamDyn>;
}