hide

Crates.iohide
lib.rshide
version0.1.5
sourcesrc
created_at2023-11-20 15:11:36.52827
updated_at2024-05-21 12:07:35.241203
descriptionHide credentials from debug output
homepage
repositoryhttps://github.com/ctron/hide
max_upload_size
id1042330
size7,320
Jens Reimann (ctron)

documentation

README

hide (from debug)

crates.io docs.rs

Hide secrets from logs.

Seriously?

You might ask: "A crate, for a simple feature like this?". Yes, maybe this type will be shared between crates. Compared to multiple different types in different crates.

Add to your project

hide = "0.1

Usage

use hide::Hide;

#[derive(Debug)]
pub struct MyStruct {
    username: String,
    password: Hide<String>,
}

fn example1() {
    let data = MyStruct {
        username: "user".to_string(),
        password: "password".to_string().into(),
    };
    println!("{data:#?}");
}

Will give you:

MyStruct {
    username: "user",
    password: ***,
}
Commit count: 15

cargo fmt