pub struct SecretRef(/* private fields */);Expand description
A safe reference to a secret value.
Implementations§
Source§impl SecretRef
impl SecretRef
Sourcepub fn new(input: impl AsRef<str>) -> Result<SecretRef, SecretRefError>
pub fn new(input: impl AsRef<str>) -> Result<SecretRef, SecretRefError>
Creates a secret reference from a non-empty identifier.
§Errors
Returns SecretRefError when the input is empty after trimming.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Returns the owned secret reference identifier.
Trait Implementations§
Source§impl Ord for SecretRef
impl Ord for SecretRef
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for SecretRef
impl PartialOrd for SecretRef
impl Eq for SecretRef
impl StructuralPartialEq for SecretRef
Auto Trait Implementations§
impl Freeze for SecretRef
impl RefUnwindSafe for SecretRef
impl Send for SecretRef
impl Sync for SecretRef
impl Unpin for SecretRef
impl UnsafeUnpin for SecretRef
impl UnwindSafe for SecretRef
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