pub(crate) fn receive_auth_ok<'a>(
        &'a mut self,
        plugin: &'a AuthPlugin,
        password: &'a str,
        nonce: &'a [u8],
    ) -> BoxFuture<'a, crate::Result<()>> {
        Box::pin(async move {
            self.receive().await?;

            match self.packet[0] {
                0x00 => self.handle_ok().map(drop),
                0xfe => self.handle_auth_switch(password).await,
                0xff => self.handle_err(),

                _ => self.handle_auth_continue(plugin, password, nonce).await,
            }
        })
    }
/// Receives an [OkPacket] from the database server. This is called at the end of
/// authentication to confirm the established connection.
Receives an [OkPacket] from the database server. This is called at the end of
authentication to confirm the established connection.
Receives an [ OkPacket ] from the database server . This is called at the end of authentication to confirm the established connection .
pub(crate) fn receive_auth_ok<'a>(
        &'a mut self,
        plugin: &'a AuthPlugin,
        password: &'a str,
        nonce: &'a [u8],
    ) -> BoxFuture<'a, crate::Result<()>> {
        Box::pin(async move {
            self.receive().await?;
            match self.packet[0] {
                0x00 => self.handle_ok().map(drop),
                0xfe => self.handle_auth_switch(password).await,
                0xff => self.handle_err(),
                _ => self.handle_auth_continue(plugin, password, nonce).await,
            }
        })
    }
pub ( crate ) fn receive_auth_ok < ' a > ( & ' a mut self , plugin : & ' a AuthPlugin , password : & ' a str , nonce : & ' a [ u8 ] , ) -> BoxFuture < ' a , crate :: Result < ( ) > > { Box :: pin ( async move { self . receive ( ) . await ? ; match self . packet [ 0 ] { 0x00 => self . handle_ok ( ) . map ( drop ) , 0xfe => self . handle_auth_switch ( password ) . await , 0xff => self . handle_err ( ) , _ => self . handle_auth_continue ( plugin , password , nonce ) . await , } } ) }
Receives an [OkPacket] from the database server.
Receives an [ OkPacket ] from the database server .
&'a mut self
plugin
&'a AuthPlugin
password
&'a str
nonce
&'a [u8]
&'a mut self
plugin
&'a AuthPlugin
password
&'a str
nonce
&'a [u8]