pub fn into_0rtt(mut self) -> Result<(NewConnection<S>, ZeroRttAccepted), Self> {
        // This lock borrows `self` and would normally be dropped at the end of this scope, so we'll
        // have to release it explicitly before returning `self` by value.
        let conn = (self.conn.as_mut().unwrap().0).lock().unwrap();
        if conn.inner.has_0rtt() || conn.inner.side().is_server() {
            drop(conn);
            let conn = self.conn.take().unwrap();
            Ok((NewConnection::new(conn), ZeroRttAccepted(self.connected)))
        } else {
            drop(conn);
            Err(self)
        }
    }
/// Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security
///
/// Opens up the connection for use before the handshake finishes, allowing the API user to
/// send data with 0-RTT encryption if the necessary key material is available. This is useful
/// for reducing start-up latency by beginning transmission of application data without waiting
/// for the handshake's cryptographic security guarantees to be established.
///
/// When the `ZeroRttAccepted` future completes, the connection has been fully established.
///
/// # Security
///
/// On outgoing connections, this enables transmission of 0-RTT data, which might be vulnerable
/// to replay attacks, and should therefore never invoke non-idempotent operations.
///
/// On incoming connections, this enables transmission of 0.5-RTT data, which might be
/// intercepted by a man-in-the-middle. If this occurs, the handshake will not complete
/// successfully.
///
/// # Errors
///
/// Outgoing connections are only 0-RTT-capable when a cryptographic session ticket cached from
/// a previous connection to the same server is available, and includes a 0-RTT key. If no such
/// ticket is found, `self` is returned unmodified.
///
/// For incoming connections, a 0.5-RTT connection will always be successfully constructed.
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security
Opens up the connection for use before the handshake finishes, allowing the API user to
send data with 0-RTT encryption if the necessary key material is available. This is useful
for reducing start-up latency by beginning transmission of application data without waiting
for the handshake's cryptographic security guarantees to be established.

When the `ZeroRttAccepted` future completes, the connection has been fully established.
Convert into a 0 - RTT or 0 . 5 - RTT connection at the cost of weakened security Opens up the connection for use before the handshake finishes allowing the API user to send data with 0 - RTT encryption if the necessary key material is available . This is useful for reducing start - up latency by beginning transmission of application data without waiting for the handshake ' s cryptographic security guarantees to be established . When the ` ZeroRttAccepted ` future completes the connection has been fully established .
pub fn into_0rtt(mut self) -> Result<(NewConnection<S>, ZeroRttAccepted), Self> {
        // This lock borrows `self` and would normally be dropped at the end of this scope, so we'll
        // have to release it explicitly before returning `self` by value.
        let conn = (self.conn.as_mut().unwrap().0).lock().unwrap();
        if conn.inner.has_0rtt() || conn.inner.side().is_server() {
            drop(conn);
            let conn = self.conn.take().unwrap();
            Ok((NewConnection::new(conn), ZeroRttAccepted(self.connected)))
        } else {
            drop(conn);
            Err(self)
        }
    }
pub fn into_0rtt ( mut self ) -> Result < ( NewConnection < S > , ZeroRttAccepted ) , Self > { // This lock borrows `self` and would normally be dropped at the end of this scope, so we'll // have to release it explicitly before returning `self` by value. let conn = ( self . conn . as_mut ( ) . unwrap ( ) . 0 ) . lock ( ) . unwrap ( ) ; if conn . inner . has_0rtt ( ) || conn . inner . side ( ) . is_server ( ) { drop ( conn ) ; let conn = self . conn . take ( ) . unwrap ( ) ; Ok ( ( NewConnection :: new ( conn ) , ZeroRttAccepted ( self . connected ) ) ) } else { drop ( conn ) ; Err ( self ) } }
Convert into a 0-RTT or 0.5-RTT connection at the cost of weakened security
Opens up the connection for use before the handshake finishes, allowing the API user to
send data with 0-RTT encryption if the necessary key material is available.
Convert into a 0 - RTT or 0 . 5 - RTT connection at the cost of weakened security Opens up the connection for use before the handshake finishes allowing the API user to send data with 0 - RTT encryption if the necessary key material is available .
mut self
security
On outgoing connections, this enables transmission of 0-RTT data, which might be vulnerable
to replay attacks, and should therefore never invoke non-idempotent operations.

On incoming connections, this enables transmission of 0.5-RTT data, which might be
intercepted by a man-in-the-middle. If this occurs, the handshake will not complete
successfully.
On outgoing connections this enables transmission of 0 - RTT data which might be vulnerable to replay attacks and should therefore never invoke non - idempotent operations . On incoming connections this enables transmission of 0 . 5 - RTT data which might be intercepted by a man - in - the - middle . If this occurs the handshake will not complete successfully .
errors
Outgoing connections are only 0-RTT-capable when a cryptographic session ticket cached from
a previous connection to the same server is available, and includes a 0-RTT key. If no such
ticket is found, `self` is returned unmodified.

For incoming connections, a 0.5-RTT connection will always be successfully constructed.
Outgoing connections are only 0 - RTT - capable when a cryptographic session ticket cached from a previous connection to the same server is available and includes a 0 - RTT key . If no such ticket is found ` self ` is returned unmodified . For incoming connections a 0 . 5 - RTT connection will always be successfully constructed .