pub async fn subscribe(
        &mut self,
        mqtt_topics: &Vec<(String, Qos)>,
    ) -> Result<Vec<Result<(Receiver<Vec<u8>>, Qos), MqttError>>, GcpIoTError> {
        // Add the topic management
        let topics: Vec<(String, Qos)> = mqtt_topics
            .iter()
            .map(|(topic, qos)| ((self.topic_prefix.to_owned() + topic), qos.clone()))
            .collect();

        info!("Subscribing into {:?}", topics);

        Ok(self.client.subscribe(&topics).await?)
    }
/// Subscribe to a set of topics.
///
/// Enables client to listen given topics with the defined quality of the service. The outer result
/// indicates how the overall operation performed and each topic inside has a result of its own related to the
/// status of the subscription.
///
/// The method aggregates the prefix '/devices/*device_id*/ and the caller only need to supply the topic (without '/').
///
/// The returned Receivers channels are used to communicate packets to given topic and they match the order in which the topics were supplied.
///
Subscribe to a set of topics.
Enables client to listen given topics with the defined quality of the service. The outer result
indicates how the overall operation performed and each topic inside has a result of its own related to the
status of the subscription.

The method aggregates the prefix '/devicesdevice_id*/ and the caller only need to supply the topic (without '/').

The returned Receivers channels are used to communicate packets to given topic and they match the order in which the topics were supplied.
Subscribe to a set of topics . Enables client to listen given topics with the defined quality of the service . The outer result indicates how the overall operation performed and each topic inside has a result of its own related to the status of the subscription . The method aggregates the prefix ' / devicesdevice_id * / and the caller only need to supply the topic ( without ' / ' ) . The returned Receivers channels are used to communicate packets to given topic and they match the order in which the topics were supplied .
pub async fn subscribe(
        &mut self,
        mqtt_topics: &Vec<(String, Qos)>,
    ) -> Result<Vec<Result<(Receiver<Vec<u8>>, Qos), MqttError>>, GcpIoTError> {
        // Add the topic management
        let topics: Vec<(String, Qos)> = mqtt_topics
            .iter()
            .map(|(topic, qos)| ((self.topic_prefix.to_owned() + topic), qos.clone()))
            .collect();
        info!("Subscribing into {:?}", topics);
        Ok(self.client.subscribe(&topics).await?)
    }
pub async fn subscribe ( & mut self , mqtt_topics : & Vec < ( String , Qos ) > , ) -> Result < Vec < Result < ( Receiver < Vec < u8 > > , Qos ) , MqttError > > , GcpIoTError > { // Add the topic management let topics : Vec < ( String , Qos ) > = mqtt_topics . iter ( ) . map ( | ( topic , qos ) | ( ( self . topic_prefix . to_owned ( ) + topic ) , qos . clone ( ) ) ) . collect ( ) ; info ! ( " " topics ) ; Ok ( self . client . subscribe ( & topics ) . await ? ) }
Subscribe to a set of topics.
Subscribe to a set of topics .
&mut self
mqtt_topics
&Vec<(String, Qos)>
&mut self
mqtt_topics
&Vec<(String, Qos)>