Struct hyper_openssl::StreamGuard [] [src]

pub struct StreamGuard<'a, T: Read + Write + 'a>(_);

A guard around a locked inner SSL stream.

Methods from Deref<Target=SslStream<T>>

Like read, but returns an ssl::Error rather than an io::Error.

This is particularly useful with a nonblocking socket, where the error value will identify if OpenSSL is waiting on read or write readiness.

Like write, but returns an ssl::Error rather than an io::Error.

This is particularly useful with a nonblocking socket, where the error value will identify if OpenSSL is waiting on read or write readiness.

Shuts down the session.

The shutdown process consists of two steps. The first step sends a close notify message to the peer, after which ShutdownResult::Sent is returned. The second step awaits the receipt of a close notify message from the peer, after which ShutdownResult::Received is returned.

While the connection may be closed after the first step, it is recommended to fully shut the session down. In particular, it must be fully shut down if the connection is to be used for further communication in the future.

Returns a reference to the underlying stream.

Returns a mutable reference to the underlying stream.

Warning

It is inadvisable to read from or write to the underlying stream as it will most likely corrupt the SSL session.

Returns the OpenSSL Ssl object associated with this stream.

Trait Implementations

impl<'a, T: Read + Write + 'a> Deref for StreamGuard<'a, T>
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<'a, T: Read + Write + 'a> DerefMut for StreamGuard<'a, T>
[src]

The method called to mutably dereference a value