Enum openssl::ssl::MaybeSslStream
[−]
[src]
pub enum MaybeSslStream<S> where S: Read + Write {
Ssl(SslStream<S>),
Normal(S),
}
A utility type to help in cases where the use of SSL is decided at runtime.
Variants
Ssl | A connection using SSL |
Normal | A connection not using SSL |
Methods
impl<S> MaybeSslStream<S> where S: Read + Write
fn get_ref(&self) -> &S
Returns a reference to the underlying stream.
fn get_mut(&mut self) -> &mut S
Returns a mutable reference to the underlying stream.
Warning
It is inadvisable to read from or write to the underlying stream.