From 66cabd882c301700123faef1dd2b0ad555ce0873 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 9 Mar 2021 12:45:39 +0100 Subject: [PATCH] Introduce MidHandshakeSslStream::into_parts --- boring/src/ssl/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/boring/src/ssl/mod.rs b/boring/src/ssl/mod.rs index c93cbf5c..a3bbc48f 100644 --- a/boring/src/ssl/mod.rs +++ b/boring/src/ssl/mod.rs @@ -2876,6 +2876,11 @@ impl MidHandshakeSslStream { 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. /// /// This corresponds to [`SSL_do_handshake`].