pub fn encode(&self) -> (u8, Option<u8>) {
        match *self {
            Command::SetLights(ref lights) => (0xED, Some(lights.encode())),
            Command::GetScanCode(ref set) => (0xF0, Some(set.encode())),
            Command::Echo => (0xEE, None),
        }
    }
/// Encodes this command into a command byte, and possibly
/// a data byte.
Encodes this command into a command byte, and possibly
a data byte.
Encodes this command into a command byte and possibly a data byte .
pub fn encode(&self) -> (u8, Option<u8>) {
        match *self {
            Command::SetLights(ref lights) => (0xED, Some(lights.encode())),
            Command::GetScanCode(ref set) => (0xF0, Some(set.encode())),
            Command::Echo => (0xEE, None),
        }
    }
pub fn encode ( & self ) -> ( u8 , Option < u8 > ) { match * self { Command :: SetLights ( ref lights ) => ( 0xED , Some ( lights . encode ( ) ) ) , Command :: GetScanCode ( ref set ) => ( 0xF0 , Some ( set . encode ( ) ) ) , Command :: Echo => ( 0xEE , None ) , } }
Encodes this command into a command byte, and possibly
a data byte.
Encodes this command into a command byte and possibly a data byte .
&self
&self