pub trait Service: Sized { type Event; // Required method fn on_write(&self, handle: u16, data: &[u8]) -> Option<Self::Event>; }