pub struct Obfuscated<T>(/* private fields */);
Expand description
We often want logging for some values that we shouldn’t know the real value of, for privacy reasons.
ConversationId
is a canonical example of such an item.
This wrapper lets us log a partial hash of the sensitive item, so we have deterministic loggable non-sensitive aliases for all our sensitive values.
Implementations§
Source§impl<T> Obfuscated<T>
impl<T> Obfuscated<T>
pub fn new(__0: T) -> Obfuscated<T>
Trait Implementations§
Source§impl<T> Debug for Obfuscated<T>where
T: Obfuscate,
impl<T> Debug for Obfuscated<T>where
T: Obfuscate,
Source§impl<T> From<T> for Obfuscated<T>
impl<T> From<T> for Obfuscated<T>
Source§fn from(original: T) -> Obfuscated<T>
fn from(original: T) -> Obfuscated<T>
Converts to this type from the input type.
Auto Trait Implementations§
impl<T> Freeze for Obfuscated<T>where
T: Freeze,
impl<T> RefUnwindSafe for Obfuscated<T>where
T: RefUnwindSafe,
impl<T> Send for Obfuscated<T>where
T: Send,
impl<T> Sync for Obfuscated<T>where
T: Sync,
impl<T> Unpin for Obfuscated<T>where
T: Unpin,
impl<T> UnwindSafe for Obfuscated<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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more