redacted_debug 0.2.0

A small procedural macro to allow redacting sensitive information without losing the ease of use of deriving Debug
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 7.97 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 278.63 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • richo

A generic mechanism for redacting things in your Debug impls

There is a small example that shows how to use it, but generally speaking:

use redacted_debug::RedactedDebug;

#[derive(RedactedDebug)]
struct User {
    username: String,
    #[redacted]
    password: String,
    /* ... */
}

This will give you a Debug implementation, but when printed the password field will be "...".