pub mod temperature;
use serde::{Deserialize, Serialize};
use self::temperature::TemperatureState;
#[derive(Serialize, Deserialize)]
pub struct FullStateResponse {
pub temperature: Option<TemperatureState>,
pub sd: Option<SDState>,
pub state: Option<PrinterState>,
}
#[derive(Serialize, Deserialize, Debug)]
pub enum StateExclude {
Temperature,
SD,
State,
}
#[derive(Serialize, Deserialize)]
pub struct PrinterState {
text: String,
flags: PrinterStateFlags,
}
#[derive(Serialize, Deserialize)]
pub struct PrinterStateFlags {
pub operational: bool,
pub paused: bool,
pub printing: bool,
pub pausing: bool,
pub cancelling: bool,
#[serde(rename = "sdReady")]
pub sd_ready: bool,
pub error: bool,
pub ready: bool,
#[serde(rename = "closedError")]
pub closed_error: bool,
}
#[derive(Serialize, Deserialize)]
pub struct ResendStats {
pub count: usize,
pub transmitted: usize,
pub ratio: usize,
}
#[derive(Serialize, Deserialize)]
pub struct SDState {
ready: bool,
}