Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ctron/hide
Hide credentials from debug output
https://github.com/ctron/hide
Last synced: 4 days ago
JSON representation
Hide credentials from debug output
- Host: GitHub
- URL: https://github.com/ctron/hide
- Owner: ctron
- Created: 2023-11-20T14:59:21.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-05-21T12:07:40.000Z (6 months ago)
- Last Synced: 2024-10-08T09:32:06.256Z (about 1 month ago)
- Language: Rust
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hide (from debug)
[![crates.io](https://img.shields.io/crates/v/hide.svg)](https://crates.io/crates/hide)
[![docs.rs](https://docs.rs/hide/badge.svg)](https://docs.rs/hide)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
```tom
hide = "0.1
```## Usage
```rust
use hide::Hide;#[derive(Debug)]
pub struct MyStruct {
username: String,
password: Hide,
}fn example1() {
let data = MyStruct {
username: "user".to_string(),
password: "password".to_string().into(),
};
println!("{data:#?}");
}
```Will give you:
```
MyStruct {
username: "user",
password: ***,
}
```