color-debug 0.1.1

Monkey-patches Rust's fmt system to make Debug colored
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 71.45 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 583.86 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 16s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Kyuuhachi/Color-Debug
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Kyuuhachi

Color-Debug

Monkey-patches fmt machinery to colorize debug output.

example

Limitations

This is of course very hacky, so anything may break in the future. Known limitations include:

  • Struct and tuple names can only be colorized on nightly (requires nightly feature flag).
    • Specifically, derived Debug impls use internal shorthand methods which need to be hooked. If they were not, then manual and derived impls would look different.
  • Derived unit structs/variants are not colorized, as they are just a write_str call.
  • Field names are not colored when using nightly-only field_with.
  • References to integer types are only colorized up to a certain depth, due to inlining.