pub struct PlainCode(/* private fields */);Expand description
A one-time code in plaintext — either freshly generated for one-time display, or received as user input. Never persisted (INV-1).
Implementations§
Source§impl PlainCode
impl PlainCode
Sourcepub fn expose(&self) -> &str
pub fn expose(&self) -> &str
Borrow the plaintext. See SecretString::expose.
Sourcepub fn as_secret(&self) -> &SecretString
pub fn as_secret(&self) -> &SecretString
Borrow the inner SecretString.
Trait Implementations§
impl Eq for PlainCode
impl StructuralPartialEq for PlainCode
Auto Trait Implementations§
impl Freeze for PlainCode
impl RefUnwindSafe for PlainCode
impl Send for PlainCode
impl Sync for PlainCode
impl Unpin for PlainCode
impl UnsafeUnpin for PlainCode
impl UnwindSafe for PlainCode
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