dendrite_lib 0.12.0

Event Sourcing and CQRS in Rust with AxonServer.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use prost::Message;
use std::fmt::{Debug, Error, Formatter};

pub struct Debuggable<'a>(&'a dyn Message);

impl<'a> Debuggable<'a> {
    pub fn from(message: &'a dyn Message) -> Self {
        Debuggable(message)
    }
}

impl Debug for Debuggable<'_> {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error> {
        self.0.fmt(f)
    }
}