Crates.io | redacted_debug |
lib.rs | redacted_debug |
version | 0.2.0 |
source | src |
created_at | 2019-02-05 06:30:23.333584 |
updated_at | 2023-01-16 06:21:56.99071 |
description | A small procedural macro to allow redacting sensitive information without losing the ease of use of deriving Debug |
homepage | |
repository | |
max_upload_size | |
id | 112848 |
size | 7,322 |
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 "..."
.