/// Opens a connection and returns it
///
/// # Returns
///
/// If successful a [Connection] if not an error
///
Opens a connection and returns it
Opens a connection and returns it
async fn connect(&self) -> Result<Connection, CachemError> {
        let stream = TcpStream::connect(&self.url)
            .await
            .map_err(|_| CachemError::ConnectionPoolError(ConnectionPoolError::CannotConnect))?;
        Ok(Connection::new(stream))
    }
async fn connect ( & self ) -> Result < Connection , CachemError > { let stream = TcpStream :: connect ( & self . url ) . await . map_err ( | _ | CachemError :: ConnectionPoolError ( ConnectionPoolError :: CannotConnect ) ) ? ; Ok ( Connection :: new ( stream ) ) }
Opens a connection and returns it
Opens a connection and returns it
If successful a [Connection] if not an error
If successful a [ Connection ] if not an error
&self