uhppote_rs/types/
direction.rs

1#[derive(Debug)]
2pub enum Direction {
3    In = 1,
4    Out = 2,
5    Unknown,
6}
7
8impl From<u8> for Direction {
9    fn from(direction: u8) -> Direction {
10        match direction {
11            1 => Direction::In,
12            2 => Direction::Out,
13            _ => Direction::Unknown,
14        }
15    }
16}