spin_factor_outbound_mqtt

Trait ClientCreator

Source
pub trait ClientCreator: Send + Sync {
    // Required method
    fn create(
        &self,
        address: String,
        username: String,
        password: String,
        keep_alive_interval: Duration,
    ) -> Result<Arc<dyn MqttClient>, Error>;
}
Expand description

A trait for creating MQTT client.

Required Methods§

Source

fn create( &self, address: String, username: String, password: String, keep_alive_interval: Duration, ) -> Result<Arc<dyn MqttClient>, Error>

Implementors§

Source§

impl<F> ClientCreator for F
where F: Fn(String, String, String, Duration) -> Result<Arc<dyn MqttClient>, Error> + Send + Sync,