1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
#[derive(Debug, Clone, PartialEq)] /// A MIDI Show Control command. /// Used by [`UniversalRealTimeMsg::ShowControl`](crate::UniversalRealTimeMsg::ShowControl). /// /// Unimplemented, though the `Unimplemented` value can be used to /// represent the commands not supported here. /// /// As defined in MIDI Show Control 1.1.1 (RP002/RP014) pub enum ShowControlMsg { /// Used to represent all unimplemented MSC messages. /// Is inherently not guaranteed to be a valid message. Unimplemented(Vec<u8>), } impl ShowControlMsg { pub(crate) fn extend_midi(&self, v: &mut Vec<u8>) { match self { Self::Unimplemented(d) => v.extend_from_slice(d), } } pub(crate) fn from_midi(_m: &[u8]) -> Result<(Self, usize), &str> { Err("TODO: not implemented") } } #[cfg(test)] mod tests { // use super::*; #[test] fn serialize_show_control_msg() { // TODO } }