#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EUpdaterState {
Invalid = 0,
UpToDate = 2,
Checking = 3,
Available = 4,
Applying = 5,
ClientRestartPending = 6,
SystemRestartPending = 7,
RollBack = 8,
}
impl EUpdaterState {
pub fn from_i32(val: i32) -> Option<Self> {
match val {
x if x == Self::Invalid as i32 => Some(Self::Invalid),
x if x == Self::UpToDate as i32 => Some(Self::UpToDate),
x if x == Self::Checking as i32 => Some(Self::Checking),
x if x == Self::Available as i32 => Some(Self::Available),
x if x == Self::Applying as i32 => Some(Self::Applying),
x if x == Self::ClientRestartPending as i32 => Some(Self::ClientRestartPending),
x if x == Self::SystemRestartPending as i32 => Some(Self::SystemRestartPending),
x if x == Self::RollBack as i32 => Some(Self::RollBack),
_ => None,
}
}
}