pub struct Secret<T>(/* private fields */);
Expand description
A wrapper to ensure that secrets are redacted during Debug
-printing.
Implementations§
Trait Implementations§
Source§impl<'arbitrary, T: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for Secret<T>
impl<'arbitrary, T: Arbitrary<'arbitrary>> Arbitrary<'arbitrary> for Secret<T>
Source§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the given unstructured data. Read moreSource§fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
fn arbitrary_take_rest(u: Unstructured<'arbitrary>) -> Result<Self>
Generate an arbitrary value of
Self
from the entirety of the given
unstructured data. Read moreSource§fn size_hint(depth: usize) -> (usize, Option<usize>)
fn size_hint(depth: usize) -> (usize, Option<usize>)
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§fn try_size_hint(
depth: usize,
) -> Result<(usize, Option<usize>), MaxRecursionReached>
fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>
Get a size hint for how many bytes out of an
Unstructured
this type
needs to construct itself. Read moreSource§impl<'de, T> Deserialize<'de> for Secret<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Secret<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: IntoBoundedStatic> IntoBoundedStatic for Secret<T>
impl<T: IntoBoundedStatic> IntoBoundedStatic for Secret<T>
Source§type Static = Secret<<T as IntoBoundedStatic>::Static>
type Static = Secret<<T as IntoBoundedStatic>::Static>
The target type is bounded by the
'static
lifetime.Source§fn into_static(self) -> Self::Static
fn into_static(self) -> Self::Static
Convert an owned
T
into an owned T
such that T: 'static
.Source§impl<T: ToBoundedStatic> ToBoundedStatic for Secret<T>
impl<T: ToBoundedStatic> ToBoundedStatic for Secret<T>
impl<T: Eq> Eq for Secret<T>
impl<T> StructuralPartialEq for Secret<T>
Auto Trait Implementations§
impl<T> Freeze for Secret<T>where
T: Freeze,
impl<T> RefUnwindSafe for Secret<T>where
T: RefUnwindSafe,
impl<T> Send for Secret<T>where
T: Send,
impl<T> Sync for Secret<T>where
T: Sync,
impl<T> Unpin for Secret<T>where
T: Unpin,
impl<T> UnwindSafe for Secret<T>where
T: UnwindSafe,
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