#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(i32)]
pub enum EVRLinkCaps {
    Unknown = 0,
    Available = 1,
    Unimplemented = 2,
    MissingHardwareEncoding = 3,
}

impl EVRLinkCaps {
    pub fn from_i32(val: i32) -> Option<Self> {
        match val {
            x if x == Self::Unknown as i32 => Some(Self::Unknown),
            x if x == Self::Available as i32 => Some(Self::Available),
            x if x == Self::Unimplemented as i32 => Some(Self::Unimplemented),
            x if x == Self::MissingHardwareEncoding as i32 => Some(Self::MissingHardwareEncoding),
            _ => None,
        }
    }
}
