use windows::Win32::NetworkManagement::Ndis::{
IF_OPER_STATUS, IfOperStatusDormant, IfOperStatusDown, IfOperStatusLowerLayerDown,
IfOperStatusNotPresent, IfOperStatusTesting, IfOperStatusUnknown, IfOperStatusUp,
};
use crate::InterfaceOperationalState;
impl InterfaceOperationalState {
pub(super) fn from_enum(value: IF_OPER_STATUS) -> Self {
#[allow(nonstandard_style)]
match value {
IfOperStatusUp => Self::Up,
IfOperStatusDown => Self::Down,
IfOperStatusTesting => Self::Testing,
IfOperStatusUnknown => Self::Unknown,
IfOperStatusDormant => Self::Dormant,
IfOperStatusNotPresent => Self::NotPresent,
IfOperStatusLowerLayerDown => Self::LowerLayerDown,
_ => Self::Other,
}
}
}