pub struct Redact<'a>(/* private fields */);Expand description
Redacts a string by replacing all but the first and last three characters with asterisks.
- If the input string has fewer than 12 characters, it should be entirely redacted.
- If the input string has 12 or more characters, only the first three and the last three.
This design is to allow users to distinguish between different redacted strings but avoid leaking sensitive information.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Redact<'a>
impl<'a> RefUnwindSafe for Redact<'a>
impl<'a> Send for Redact<'a>
impl<'a> Sync for Redact<'a>
impl<'a> Unpin for Redact<'a>
impl<'a> UnwindSafe for Redact<'a>
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