framesmith 0.1.0

A Rust library for controlling Samsung Frame TVs over the local network
Documentation
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum MotionSensitivity {
    Low,
    Medium,
    High,
}

impl MotionSensitivity {
    pub fn as_value(&self) -> u8 {
        match self {
            Self::Low => 1,
            Self::Medium => 2,
            Self::High => 3,
        }
    }

    pub fn from_value(value: u8) -> Option<Self> {
        match value {
            1 => Some(Self::Low),
            2 => Some(Self::Medium),
            3 => Some(Self::High),
            _ => None,
        }
    }
}