pub async fn confirm_qr_code_authentication<C: AsRef<ConfirmQrCodeAuthentication>>(
        &self,
        confirm_qr_code_authentication: C,
    ) -> RTDResult<Session> {
        let extra = confirm_qr_code_authentication
            .as_ref()
            .extra()
            .ok_or(NO_EXTRA)?;
        let signal = OBSERVER.subscribe(&extra);
        self.tdlib_client.send(
            self.get_client_id()?,
            confirm_qr_code_authentication.as_ref(),
        )?;
        let received = signal.await;
        OBSERVER.unsubscribe(&extra);
        match received {
            Err(_) => Err(CLOSED_RECEIVER_ERROR),
            Ok(v) => match v {
                TdType::Session(v) => Ok(v),
                TdType::Error(v) => Err(RTDError::TDLibError(v)),
                _ => {
                    log::error!("invalid response received: {:?}", v);
                    Err(INVALID_RESPONSE_ERROR)
                }
            },
        }
    }
// Confirms QR code authentication on another device. Returns created session on success
Confirms QR code authentication on another device. Returns created session on success
Confirms QR code authentication on another device . Returns created session on success
pub async fn confirm_qr_code_authentication<C: AsRef<ConfirmQrCodeAuthentication>>(
        &self,
        confirm_qr_code_authentication: C,
    ) -> RTDResult<Session> {
        let extra = confirm_qr_code_authentication
            .as_ref()
            .extra()
            .ok_or(NO_EXTRA)?;
        let signal = OBSERVER.subscribe(&extra);
        self.tdlib_client.send(
            self.get_client_id()?,
            confirm_qr_code_authentication.as_ref(),
        )?;
        let received = signal.await;
        OBSERVER.unsubscribe(&extra);
        match received {
            Err(_) => Err(CLOSED_RECEIVER_ERROR),
            Ok(v) => match v {
                TdType::Session(v) => Ok(v),
                TdType::Error(v) => Err(RTDError::TDLibError(v)),
                _ => {
                    log::error!("invalid response received: {:?}", v);
                    Err(INVALID_RESPONSE_ERROR)
                }
            },
        }
    }
pub async fn confirm_qr_code_authentication < C : AsRef < ConfirmQrCodeAuthentication > > ( & self , confirm_qr_code_authentication : C , ) -> RTDResult < Session > { let extra = confirm_qr_code_authentication . as_ref ( ) . extra ( ) . ok_or ( NO_EXTRA ) ? ; let signal = OBSERVER . subscribe ( & extra ) ; self . tdlib_client . send ( self . get_client_id ( ) ? , confirm_qr_code_authentication . as_ref ( ) , ) ? ; let received = signal . await ; OBSERVER . unsubscribe ( & extra ) ; match received { Err ( _ ) => Err ( CLOSED_RECEIVER_ERROR ) , Ok ( v ) => match v { TdType :: Session ( v ) => Ok ( v ) , TdType :: Error ( v ) => Err ( RTDError :: TDLibError ( v ) ) , _ => { log :: error ! ( " " v ) ; Err ( INVALID_RESPONSE_ERROR ) } } , } }
Confirms QR code authentication on another device.
Confirms QR code authentication on another device .
&self
confirm_qr_code_authentication
C
&self
confirm_qr_code_authentication
C