pub trait SecretMicrotype: ExposeSecret<Self::Inner> {
type Inner: Zeroize;
// Required method
fn new(inner: Self::Inner) -> Self;
}Expand description
A trait implemented by secret microtypes
Due to their nature, secret microtypes are more restrictive than regular microtypes:
inner,inner_mutandinto_innerare removed, since they can allow accidental use of the contained secret.SecretMicrotyperequiresExposeSecret<Self::Inner>; to use the contained data, use.expose_secret()
The wrapped type must also implement secrecy::Zeroize
Required Associated Types§
Required Methods§
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.