Skip to content

#[derive(PrettyDebug)] #1

@remexre

Description

@remexre

Once the core crate is finished, it'd be nice to have a derive for a {:#?}-like Debug, possibly with type-based coloring? So something "stringish" would be green, "intish" would be yellow, "boolish" would be cyan, etc.

It should also be infallible, so printing something of type struct Foo { a: usize, b: &'static str, c: DoesNotImplDebug, d: bool } should print:

Foo {
    a: 0,
    b: "hello",
    d: false,
    // and one other field
}

(for the "one" in "and one other field", https://crates.io/crates/english-numbers ?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions