mqrstt 0.1.3

Pure rust MQTTv5 client implementation for Smol, Tokio and soon sync too.
Documentation
// use std::fmt::Display;

// use futures_concurrency::future::Race;

// #[derive(Debug, Clone, Copy)]
// pub struct Timeout(());

// impl Display for Timeout {
//     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
//         write!(f, "Timeout")
//     }
// }

// impl std::error::Error for Timeout {}

// pub async fn timeout<T>(
//     fut: impl core::future::Future<Output = T>,
//     delay_seconds: u64,
// ) -> Result<T, Timeout> {
//     (async { Ok(fut.await) }, async {
//         #[cfg(feature = "smol")]
//         smol::Timer::after(std::time::Duration::from_secs(delay_seconds)).await;
//         #[cfg(feature = "tokio")]
//         tokio::time::sleep(tokio::time::Duration::from_secs(delay_seconds)).await;
//         Err(Timeout(()))
//     })
//         .race()
//         .await
// }