1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
//! Library to configure runtime configurations

use std::sync::atomic::AtomicBool;
use std::sync::atomic::Ordering;

/// If `REDACT_BYTES` is set, all bytes and strings will be
/// formatted as "?"
pub(crate) static REDACT_BYTES: AtomicBool = AtomicBool::new(false);

/// Set redact bytes.
pub fn set_redact_bytes(redact_bytes: bool) {
    REDACT_BYTES.store(redact_bytes, Ordering::Relaxed);
}