pub async fn check_created_public_chats_limit<C: AsRef<CheckCreatedPublicChatsLimit>>(
        &self,
        check_created_public_chats_limit: C,
    ) -> RTDResult<Ok> {
        let extra = check_created_public_chats_limit
            .as_ref()
            .extra()
            .ok_or(NO_EXTRA)?;
        let signal = OBSERVER.subscribe(&extra);
        self.tdlib_client.send(
            self.get_client_id()?,
            check_created_public_chats_limit.as_ref(),
        )?;
        let received = signal.await;
        OBSERVER.unsubscribe(&extra);
        match received {
            Err(_) => Err(CLOSED_RECEIVER_ERROR),
            Ok(v) => match v {
                TdType::Ok(v) => Ok(v),
                TdType::Error(v) => Err(RTDError::TDLibError(v)),
                _ => {
                    log::error!("invalid response received: {:?}", v);
                    Err(INVALID_RESPONSE_ERROR)
                }
            },
        }
    }
// Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached
Checks whether the maximum number of owned public chats has been reached. Returns corresponding error if the limit was reached
Checks whether the maximum number of owned public chats has been reached . Returns corresponding error if the limit was reached
pub async fn check_created_public_chats_limit<C: AsRef<CheckCreatedPublicChatsLimit>>(
        &self,
        check_created_public_chats_limit: C,
    ) -> RTDResult<Ok> {
        let extra = check_created_public_chats_limit
            .as_ref()
            .extra()
            .ok_or(NO_EXTRA)?;
        let signal = OBSERVER.subscribe(&extra);
        self.tdlib_client.send(
            self.get_client_id()?,
            check_created_public_chats_limit.as_ref(),
        )?;
        let received = signal.await;
        OBSERVER.unsubscribe(&extra);
        match received {
            Err(_) => Err(CLOSED_RECEIVER_ERROR),
            Ok(v) => match v {
                TdType::Ok(v) => Ok(v),
                TdType::Error(v) => Err(RTDError::TDLibError(v)),
                _ => {
                    log::error!("invalid response received: {:?}", v);
                    Err(INVALID_RESPONSE_ERROR)
                }
            },
        }
    }
pub async fn check_created_public_chats_limit < C : AsRef < CheckCreatedPublicChatsLimit > > ( & self , check_created_public_chats_limit : C , ) -> RTDResult < Ok > { let extra = check_created_public_chats_limit . as_ref ( ) . extra ( ) . ok_or ( NO_EXTRA ) ? ; let signal = OBSERVER . subscribe ( & extra ) ; self . tdlib_client . send ( self . get_client_id ( ) ? , check_created_public_chats_limit . as_ref ( ) , ) ? ; let received = signal . await ; OBSERVER . unsubscribe ( & extra ) ; match received { Err ( _ ) => Err ( CLOSED_RECEIVER_ERROR ) , Ok ( v ) => match v { TdType :: Ok ( v ) => Ok ( v ) , TdType :: Error ( v ) => Err ( RTDError :: TDLibError ( v ) ) , _ => { log :: error ! ( " " v ) ; Err ( INVALID_RESPONSE_ERROR ) } } , } }
Checks whether the maximum number of owned public chats has been reached.
Checks whether the maximum number of owned public chats has been reached .
&self
check_created_public_chats_limit
C
&self
check_created_public_chats_limit
C