pub struct Secret(String);Expand description
Wraps a credential — the STOMP passcode — so a stray Debug or
Display on a config struct cannot print it.
Debug and Display render <redacted> for any non-empty value (and
an empty string for an unset one, so a config dump still shows whether
a passcode is configured). Self::expose is the one, greppable way
to read the value back, and is called only where the CONNECT frame is
assembled.
Tuple Fields§
§0: StringImplementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Secret
impl<'de> Deserialize<'de> for Secret
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
Auto Trait Implementations§
impl Freeze for Secret
impl RefUnwindSafe for Secret
impl Send for Secret
impl Sync for Secret
impl Unpin for Secret
impl UnwindSafe for Secret
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