dbg-pls icon indicating copy to clipboard operation
dbg-pls copied to clipboard

Integration with Serde

Open amab8901 opened this issue 7 months ago • 2 comments

I have a struct containing a serde_json::Value field like this:

use dbg_pls::{color, DebugPls};
use serde_json::Value;

fn main() {
    let expr = Structer::default();
    color!(expr);
}

#[derive(Default, Clone, DebugPls)]
struct Structer {
    pub field1: Value,
    pub field2: u32,
    pub field3: Vec<bool>,
}

Orphan rule doesn't let me apply DebugPls on serde_json::Value. Can you apply it (behind a serde feature)?

I think it's good to also apply std dbg! as a fallback for cases where I wanna use a 3rd party type for which DebugPls hasn't been implemented

amab8901 avatar Jul 24 '24 06:07 amab8901