Trait DebugSecret

Source
pub trait DebugSecret: Debug + Zeroize {
    // Provided method
    fn debug_secret(f: &mut Formatter<'_>) -> Result<(), Error> { ... }
}
Available on crate feature debug-secret only.
Expand description

A trait for debuggable secrets.

This trait extends the standard Debug trait for types that represent secrets, allowing them to be formatted for debugging purposes.

Provided Methods§

Source

fn debug_secret(f: &mut Formatter<'_>) -> Result<(), Error>

Formats the secret as “[REDACTED]”.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl DebugSecret for f32

Source§

impl DebugSecret for f64

Source§

impl DebugSecret for i8

Source§

impl DebugSecret for i16

Source§

impl DebugSecret for i32

Source§

impl DebugSecret for i64

Source§

impl DebugSecret for i128

Source§

impl DebugSecret for isize

Source§

impl DebugSecret for u8

Source§

impl DebugSecret for u16

Source§

impl DebugSecret for u32

Source§

impl DebugSecret for u64

Source§

impl DebugSecret for u128

Source§

impl DebugSecret for usize

Source§

impl DebugSecret for String

Available on crate feature alloc only.
Source§

impl<T: Debug + Zeroize> DebugSecret for Vec<T>

Available on crate feature alloc only.
Source§

impl<T: Debug + Zeroize, const N: usize> DebugSecret for [T; N]

Implementors§