#[cfg(feature = "tokio")]
mod tokio;
#[cfg(feature = "tokio")]
pub use tokio::TcpTransport;
#[cfg(feature = "embassy")]
mod embassy;
#[cfg(feature = "embassy")]
pub use embassy::TcpTransport;
#[cfg(test)]
mod mock;
#[cfg(test)]
pub use mock::MockTransport;
use embedded_io_async::{Read, Write};
use crate::error::TransportError;
#[allow(async_fn_in_trait)]
pub trait MqttTransport: Read<Error = TransportError> + Write<Error = TransportError> {
async fn close(&mut self) -> Result<(), TransportError>;
fn is_connected(&self) -> bool;
fn local_addr(&self) -> Option<&str> {
None
}
fn remote_addr(&self) -> Option<&str> {
None
}
}