use std::fmt; use crate::{ Plugin, Model, Param }; pub enum Data { Midi([u8; 3]), Parameter { param: &'static Param>::Smooth>, val: f32 } } pub struct Event { pub frame: usize, pub data: Data

} //// // debug impls //// impl fmt::Debug for Data

{ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Data::Midi(m) => f.debug_tuple("Data::Midi") .field(&m) .finish(), Data::Parameter { param, val } => f.debug_struct("Data::Parameter") .field("param", ¶m) .field("val", &val) .finish() } } } impl fmt::Debug for Event

{ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { f.debug_struct("Event") .field("frame", &self.frame) .field("data", &self.data) .finish() } }