(&self, f: &mut std::fmt::Formatter<'_>)
| 28 | |
| 29 | impl<D: Debug> Debug for Event<D> { |
| 30 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
| 31 | f.debug_struct("Event") |
| 32 | .field("envelope", &self.envelope) |
| 33 | .field("envelope_cid", &self.envelope_cid.to_string()) |
| 34 | .field("payload", &self.payload) |
| 35 | .field("payload_cid", &self.payload_cid.to_string()) |
| 36 | .field( |
| 37 | "capability", |
| 38 | &self |
| 39 | .capability |
| 40 | .as_ref() |
| 41 | .map(|(cid, cap)| (cid.to_string(), cap)), |
| 42 | ) |
| 43 | .finish() |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | impl<D: serde::Serialize> Event<D> { |