pub trait AsyncBufPassthrough {
fn passthrough(&mut self, enabled: bool);
}
#[cfg(feature = "tokio-rustls")]
impl<IO: AsyncBufPassthrough> AsyncBufPassthrough for tokio_rustls::server::TlsStream<IO> {
fn passthrough(&mut self, enabled: bool) {
self.get_mut().0.passthrough(enabled);
}
}
#[cfg(feature = "tokio-rustls")]
impl<IO: AsyncBufPassthrough> AsyncBufPassthrough for tokio_rustls::client::TlsStream<IO> {
fn passthrough(&mut self, enabled: bool) {
self.get_mut().0.passthrough(enabled);
}
}
#[cfg(feature = "tokio-openssl")]
impl<IO: AsyncBufPassthrough> AsyncBufPassthrough for tokio_openssl::SslStream<IO> {
fn passthrough(&mut self, enabled: bool) {
self.get_mut().passthrough(enabled);
}
}