1#[derive(Debug, PartialEq)]
6pub enum SyncCommand {
7 Data,
8 Dent,
9 Done,
10 Fail,
11 List,
12 Okay,
13 Quit,
14 Recv,
15 Send,
16 Stat,
17}
18
19impl SyncCommand {
20 pub fn code(&self) -> &'static [u8; 4] {
22 use self::SyncCommand::*;
23 match *self {
24 Data => b"DATA",
25 Dent => b"DENT",
26 Done => b"DONE",
27 Fail => b"FAIL",
28 List => b"LIST",
29 Okay => b"OKAY",
30 Quit => b"QUIT",
31 Recv => b"RECV",
32 Send => b"SEND",
33 Stat => b"STAT",
34 }
35 }
36}
37
38pub type DeviceSerial = String;