1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
use std::fmt;

#[repr(u8)]
#[derive(Clone, Debug, PartialEq)]
pub enum ModuleState {
    Uninitialized = 0,
    Ready = 1,
    Running = 2,
    Error = 3,
}

impl fmt::Display for ModuleState {
    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
        write!(f, "{:?}", self)
    }
}