Skip to main content

Sensitive

Trait Sensitive 

Source
pub trait Sensitive {
    type Inner: ?Sized;

    // Required method
    fn expose_secret(&self) -> &Self::Inner;
}
Expand description

Disciplines yourself. This trait does NOT enforce:

  • Drop wipes the storage on out-of-scope.
  • Redacting fmt::Debug impl (never derive).
  • No Clone / no Copy.

Required Associated Types§

Source

type Inner: ?Sized

The type whose bytes are the secret material.

Required Methods§

Source

fn expose_secret(&self) -> &Self::Inner

Explicit-secret-access getter. Mirrors the inherent expose_secret every sensitive type provides.

Implementors§

Source§

impl<const N: usize, O> Sensitive for SensitiveBytes<N, O>

Source§

type Inner = [u8; N]