mqtt_channel_client/
errors.rs1use crate::Event;
2
3pub type Result<T> = std::result::Result<T, Error>;
5
6#[derive(Debug, thiserror::Error)]
8pub enum Error {
9 #[error("MQTT error")]
10 MqttError(#[from] paho_mqtt::Error),
11
12 #[error("Task join error")]
13 JoinError(#[from] tokio::task::JoinError),
14
15 #[error("Channel error")]
16 ChannelError(#[from] tokio::sync::broadcast::error::SendError<Event>),
17
18 #[error("Client was requested to start but is already started")]
19 ClientAlreadyStarted,
20
21 #[error("Client was requested to stop but is already stopped")]
22 ClientAlreadyStopped,
23}