pub struct FullRedactor;Expand description
Redact the entire value with asterisks, preserving length.
The output will be at least 6 asterisks to avoid leaking information about very short values.
use apollo_redaction::Redacted;
use apollo_redaction::strategy::FullRedactor;
fn full(input: &str) -> String {
Redacted::<_, FullRedactor>::new(input).to_string()
}
assert_eq!(full("secret"), "******");
assert_eq!(full("verylongsecret"), "**************");
assert_eq!(full("abc"), "******"); // minimum 6 asterisksTrait Implementations§
Source§impl Clone for FullRedactor
impl Clone for FullRedactor
Source§fn clone(&self) -> FullRedactor
fn clone(&self) -> FullRedactor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for FullRedactor
impl Default for FullRedactor
Source§fn default() -> FullRedactor
fn default() -> FullRedactor
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FullRedactor
impl RefUnwindSafe for FullRedactor
impl Send for FullRedactor
impl Sync for FullRedactor
impl Unpin for FullRedactor
impl UnsafeUnpin for FullRedactor
impl UnwindSafe for FullRedactor
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