async fn connect(&mut self, mut params: bredr::ConnectParameters) -> Result<(), anyhow::Error> {
        if self.connection.connected() {
            return Ok(());
        }
        let channel = self
            .profile_proxy
            .connect(&mut self.id.into(), &mut params)
            .await?
            .map_err(|e| format_err!("Profile connection request error: {:?}", e))?;
        self.connection.connect(channel.try_into()?);
        Ok(())
    }
/// Make a connection to the peer only if there is not an existing connection.
Make a connection to the peer only if there is not an existing connection.
Make a connection to the peer only if there is not an existing connection .
async fn connect(&mut self, mut params: bredr::ConnectParameters) -> Result<(), anyhow::Error> {
        if self.connection.connected() {
            return Ok(());
        }
        let channel = self
            .profile_proxy
            .connect(&mut self.id.into(), &mut params)
            .await?
            .map_err(|e| format_err!("Profile connection request error: {:?}", e))?;
        self.connection.connect(channel.try_into()?);
        Ok(())
    }
async fn connect ( & mut self , mut params : bredr :: ConnectParameters ) -> Result < ( ) , anyhow :: Error > { if self . connection . connected ( ) { return Ok ( ( ) ) ; } let channel = self . profile_proxy . connect ( & mut self . id . into ( ) , & mut params ) . await ? . map_err ( | e | format_err ! ( " " e ) ) ? ; self . connection . connect ( channel . try_into ( ) ? ) ; Ok ( ( ) ) }
Make a connection to the peer only if there is not an existing connection.
Make a connection to the peer only if there is not an existing connection .
&mut self
params
bredr::ConnectParameters
&mut self
params
bredr::ConnectParameters