diff --git a/src/events.rs b/src/events.rs index e7f45295d6..ec05909c52 100644 --- a/src/events.rs +++ b/src/events.rs @@ -52,7 +52,6 @@ use crate::{ }; /// Raw bytes for an Event -#[derive(Debug)] pub struct RawEvent { /// The name of the module from whence the Event originated pub module: String, @@ -62,6 +61,16 @@ pub struct RawEvent { pub data: Vec, } +impl std::fmt::Debug for RawEvent { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("RawEvent") + .field("module", &self.module) + .field("variant", &self.variant) + .field("data", &hex::encode(&self.data)) + .finish() + } +} + /// Events decoder. #[derive(Debug)] pub struct EventsDecoder {