Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#[derive(PrettyDebug)] #1

Open
remexre opened this issue Jan 11, 2018 · 1 comment
Open

#[derive(PrettyDebug)] #1

remexre opened this issue Jan 11, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@remexre
Copy link
Owner

remexre commented Jan 11, 2018

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 ?)

@remexre remexre added the enhancement New feature or request label Jan 11, 2018
@remexre
Copy link
Owner Author

remexre commented Feb 19, 2018

Also, it might be possible to do a default impl for all Serialize types? Pending rust-lang/rust#31844 and rust-lang/rust#37653, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant