sms_types/
modem.rs

1//! Types used by the SMS server Modem, sent in events.
2
3use serde::{Deserialize, Serialize};
4
5/// Represents the current status of the modem.
6#[derive(Serialize, Deserialize, PartialEq, Debug, Clone)]
7pub enum ModemStatusUpdateState {
8    /// Modem is starting up.
9    Startup,
10
11    /// Modem is online and operational.
12    Online,
13
14    /// Modem is shutting down.
15    ShuttingDown,
16
17    /// Modem is offline and not operational.
18    Offline,
19}
20impl std::fmt::Display for ModemStatusUpdateState {
21    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
22        match self {
23            ModemStatusUpdateState::Startup => write!(f, "Startup"),
24            ModemStatusUpdateState::Online => write!(f, "Online"),
25            ModemStatusUpdateState::ShuttingDown => write!(f, "ShuttingDown"),
26            ModemStatusUpdateState::Offline => write!(f, "Offline"),
27        }
28    }
29}