pub(crate) fn init(
        &'a self,
        credentials: Option<Credentials>,
    ) -> Result<Option<<HelloCommand as Command<<P as Protocol>::FrameType>>::Response>, ConnectionError>
    {
        self.auth(credentials)?;
        if self.network.get_protocol().requires_hello() {
            return Ok(Some(
                self.send(HelloCommand {}).map_err(hello_error)?.wait().map_err(hello_error)?,
            ));
        }

        Ok(None)
    }
/// Prepares the new RESP3 client by authenticating and switching protocol (HELLO command) if needed
Prepares the new RESP3 client by authenticating and switching protocol (HELLO command) if needed
Prepares the new RESP3 client by authenticating and switching protocol ( HELLO command ) if needed
pub(crate) fn init(
        &'a self,
        credentials: Option<Credentials>,
    ) -> Result<Option<<HelloCommand as Command<<P as Protocol>::FrameType>>::Response>, ConnectionError>
    {
        self.auth(credentials)?;
        if self.network.get_protocol().requires_hello() {
            return Ok(Some(
                self.send(HelloCommand {}).map_err(hello_error)?.wait().map_err(hello_error)?,
            ));
        }
        Ok(None)
    }
pub ( crate ) fn init ( & ' a self , credentials : Option < Credentials > , ) -> Result < Option < < HelloCommand as Command < < P as Protocol > :: FrameType > > :: Response > , ConnectionError > { self . auth ( credentials ) ? ; if self . network . get_protocol ( ) . requires_hello ( ) { return Ok ( Some ( self . send ( HelloCommand { } ) . map_err ( hello_error ) ? . wait ( ) . map_err ( hello_error ) ? , ) ) ; } Ok ( None ) }
Prepares the new RESP3 client by authenticating and switching protocol (HELLO command) if needed
Prepares the new RESP3 client by authenticating and switching protocol ( HELLO command ) if needed
&'a self
credentials
Option<Credentials>
&'a self
credentials
Option<Credentials>