Introduce MidHandshakeSslStream::into_parts

This commit is contained in:
Anthony Ramine 2021-03-09 12:45:39 +01:00
parent 51734088ef
commit 66cabd882c
1 changed files with 5 additions and 0 deletions

View File

@ -2876,6 +2876,11 @@ impl<S> MidHandshakeSslStream<S> {
self.stream.into_inner() self.stream.into_inner()
} }
/// Returns both the error and the source data stream, consuming `self`.
pub fn into_parts(self) -> (Error, S) {
(self.error, self.stream.into_inner())
}
/// Restarts the handshake process. /// Restarts the handshake process.
/// ///
/// This corresponds to [`SSL_do_handshake`]. /// This corresponds to [`SSL_do_handshake`].