pub struct Sens<T>(pub T);Expand description
Used to censor specific information in your logs.
Can be activated and deactivated (at any point at runtime!) by setting the environment variable SAFE_LOGGING to true
When activated it will only print [REDACTED]
Example:
use aul::sensitive::Sens;
println!("{}",Sens("Hello")); // Hello
//change env variable "SAFE_LOGGING" to true
println!("{}",Sens("Hello")) // "[REDACTED]"Warning:
It will look for the env key every call which has a runtime cost
Tuple Fields§
§0: TTrait Implementations§
Auto Trait Implementations§
impl<T> RefUnwindSafe for Sens<T>where
T: RefUnwindSafe,
impl<T> Send for Sens<T>where
T: Send,
impl<T> Sync for Sens<T>where
T: Sync,
impl<T> Unpin for Sens<T>where
T: Unpin,
impl<T> UnwindSafe for Sens<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more