pub trait CustomTlsAcceptor: Send + Sync {
// Required method
fn accept<'life0, 'async_trait>(
&'life0 self,
stream: TcpStream,
) -> Pin<Box<dyn Future<Output = Result<Option<TlsStream<TcpStream>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
The CustomTlsAcceptor trait provides a custom implementation of accepting
TLS connections from a TcpStream. tide-rustls will call the
CustomTlsAcceptor::accept function for each new TcpStream it
accepts, to obtain a TlsStream).
Implementing this trait gives you control over the TLS negotiation process, and allows you to process some TLS connections internally without passing them through to tide, such as for multiplexing or custom ALPN negotiation.