rustphone/src/state.rs

31 lines
546 B
Rust

use arrayvec::ArrayString;
use crate::{apps, energy::EnergyStatus};
/*pub struct State {
pub global: GlobalState,
pub mode: ModeState,
}*/
pub struct State {
pub energy: EnergyStatus,
pub hour: u8,
pub minute: u8,
pub key_label_left: ArrayString<8>,
pub key_label_enter: ArrayString<8>,
pub key_label_right: ArrayString<8>,
}
#[allow(clippy::large_enum_variant)]
pub enum ModeState {
Nothing,
Clock(apps::clock::ClockState),
Dial(apps::dial::DialState),
}
impl Default for ModeState {
fn default() -> Self {
Self::Nothing
}
}