Improved impl_cast and made all traits Sync + Send + 'static
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-10 23:51:22 +02:00
parent 65f76904dd
commit b54c9512b9
9 changed files with 77 additions and 66 deletions

View File

@@ -10,7 +10,7 @@ use rumqttc::{Event, EventLoop, Incoming, Publish};
use tokio::sync::broadcast;
#[async_trait]
pub trait OnMqtt {
pub trait OnMqtt: Sync + Send + 'static {
async fn on_mqtt(&mut self, message: &Publish);
}