pub async fn connect<A>(address: A) -> Result<Self>
    where
        A: ToSocketAddrs,
    {
        let stream = Arc::new(Mutex::new(
            TcpStream::connect(address)
                .await
                .map_err(Error::ConnectionFailed)?,
        ));

        Ok(Self { stream })
    }
///Connect to a Redis instance running at `address`. If you wish to name this connection, run the [`CLIENT SETNAME`](https://redis.io/commands/client-setname) command.
Connect to a Redis instance running at `address`. If you wish to name this connection, run the [`CLIENT SETNAME`] command.
Connect to a Redis instance running at ` address ` . If you wish to name this connection run the [ ` CLIENT SETNAME ` ] command .
pub async fn connect<A>(address: A) -> Result<Self>
    where
        A: ToSocketAddrs,
    {
        let stream = Arc::new(Mutex::new(
            TcpStream::connect(address)
                .await
                .map_err(Error::ConnectionFailed)?,
        ));
        Ok(Self { stream })
    }
pub async fn connect < A > ( address : A ) -> Result < Self > where A : ToSocketAddrs , { let stream = Arc :: new ( Mutex :: new ( TcpStream :: connect ( address ) . await . map_err ( Error :: ConnectionFailed ) ? , ) ) ; Ok ( Self { stream } ) }
Connect to a Redis instance running at `address`.
Connect to a Redis instance running at ` address ` .
address
A
address
A