Macro make_callback

Source
macro_rules! make_callback {
    ($fn:expr) => { ... };
}
Expand description

A macro to turn an async fn into a callback to be passed to MqttManager::subscribe

ยงExample

use mqtt_manager::{make_callback, Publish};
async fn callback(pubpkt: Publish) {}
 
let cb_handle = make_callback!(callback);