pub(super) async fn key<E>(
        &mut self,
        reorder: impl Fn(Tx, Rx) -> (Inner, Other),
    ) -> Result<Key, RetryError<E, ConnectErr, HandshakeErr>>
    where
        Address: Clone,
        Key: Clone,
    {
        if self.key.lock().await.is_none() {
            let _ = self.inner(reorder, &mut 0, &mut None).await?;
        }
        let key = self.key.lock().await.clone().unwrap();
        Ok(key)
    }
/// Initialize the connection if necessary, and return the session key.
Initialize the connection if necessary, and return the session key.
Initialize the connection if necessary and return the session key .
pub(super) async fn key<E>(
        &mut self,
        reorder: impl Fn(Tx, Rx) -> (Inner, Other),
    ) -> Result<Key, RetryError<E, ConnectErr, HandshakeErr>>
    where
        Address: Clone,
        Key: Clone,
    {
        if self.key.lock().await.is_none() {
            let _ = self.inner(reorder, &mut 0, &mut None).await?;
        }
        let key = self.key.lock().await.clone().unwrap();
        Ok(key)
    }
pub ( super ) async fn key < E > ( & mut self , reorder : impl Fn ( Tx , Rx ) -> ( Inner , Other ) , ) -> Result < Key , RetryError < E , ConnectErr , HandshakeErr > > where Address : Clone , Key : Clone , { if self . key . lock ( ) . await . is_none ( ) { let _ = self . inner ( reorder , & mut 0 , & mut None ) . await ? ; } let key = self . key . lock ( ) . await . clone ( ) . unwrap ( ) ; Ok ( key ) }
Initialize the connection if necessary, and return the session key.
Initialize the connection if necessary and return the session key .
&mut self
reorder
impl Fn(Tx, Rx) -> (Inner, Other)