Trait StreamUpgrade

Source
pub trait StreamUpgrade: Stream {
    // Required methods
    fn secure_upgrade(
        &mut self,
    ) -> impl Future<Output = Result<(), SslError>> + Send;
    fn handshake(&self) -> Option<&TlsHandshake>;
}
Expand description

A trait for streams that can be upgraded to a TLS stream.

Required Methods§

Source

fn secure_upgrade( &mut self, ) -> impl Future<Output = Result<(), SslError>> + Send

Source

fn handshake(&self) -> Option<&TlsHandshake>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<S: Stream, D: TlsDriver> StreamUpgrade for UpgradableStream<S, D>