pub async fn forward_messages<C: AsRef<ForwardMessages>>(
        &self,
        forward_messages: C,
    ) -> RTDResult<Messages> {
        let extra = forward_messages.as_ref().extra().ok_or(NO_EXTRA)?;
        let signal = OBSERVER.subscribe(&extra);
        self.tdlib_client
            .send(self.get_client_id()?, forward_messages.as_ref())?;
        let received = signal.await;
        OBSERVER.unsubscribe(&extra);
        match received {
            Err(_) => Err(CLOSED_RECEIVER_ERROR),
            Ok(v) => match v {
                TdType::Messages(v) => Ok(v),
                TdType::Error(v) => Err(RTDError::TDLibError(v)),
                _ => {
                    log::error!("invalid response received: {:?}", v);
                    Err(INVALID_RESPONSE_ERROR)
                }
            },
        }
    }
// Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message
Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message
Forwards previously sent messages . Returns the forwarded messages in the same order as the message identifiers passed in message_ids . If a message can ' t be forwarded null will be returned instead of the message
pub async fn forward_messages<C: AsRef<ForwardMessages>>(
        &self,
        forward_messages: C,
    ) -> RTDResult<Messages> {
        let extra = forward_messages.as_ref().extra().ok_or(NO_EXTRA)?;
        let signal = OBSERVER.subscribe(&extra);
        self.tdlib_client
            .send(self.get_client_id()?, forward_messages.as_ref())?;
        let received = signal.await;
        OBSERVER.unsubscribe(&extra);
        match received {
            Err(_) => Err(CLOSED_RECEIVER_ERROR),
            Ok(v) => match v {
                TdType::Messages(v) => Ok(v),
                TdType::Error(v) => Err(RTDError::TDLibError(v)),
                _ => {
                    log::error!("invalid response received: {:?}", v);
                    Err(INVALID_RESPONSE_ERROR)
                }
            },
        }
    }
pub async fn forward_messages < C : AsRef < ForwardMessages > > ( & self , forward_messages : C , ) -> RTDResult < Messages > { let extra = forward_messages . as_ref ( ) . extra ( ) . ok_or ( NO_EXTRA ) ? ; let signal = OBSERVER . subscribe ( & extra ) ; self . tdlib_client . send ( self . get_client_id ( ) ? , forward_messages . as_ref ( ) ) ? ; let received = signal . await ; OBSERVER . unsubscribe ( & extra ) ; match received { Err ( _ ) => Err ( CLOSED_RECEIVER_ERROR ) , Ok ( v ) => match v { TdType :: Messages ( v ) => Ok ( v ) , TdType :: Error ( v ) => Err ( RTDError :: TDLibError ( v ) ) , _ => { log :: error ! ( " " v ) ; Err ( INVALID_RESPONSE_ERROR ) } } , } }
Forwards previously sent messages.
Forwards previously sent messages .
&self
forward_messages
C
&self
forward_messages
C