pub struct SecretValue(/* private fields */);
Implementations§
Source§impl SecretValue
impl SecretValue
pub fn new(src: Vec<u8>) -> SecretValue
pub fn ref_sensitive_value(&self) -> &Vec<u8> ⓘ
pub fn ref_sensitive_value_mut(&mut self) -> &mut Vec<u8> ⓘ
pub fn sensitive_value_to_str(&self) -> Result<&str, Utf8Error>
pub fn secure_clear(&mut self)
pub fn as_sensitive_str(&self) -> &str
pub fn as_sensitive_bytes(&self) -> &[u8] ⓘ
pub fn exposed_in_as_str<T, Z, FN>(&self, f: FN) -> T
pub fn exposed_in_as_zstr<T, FN>(&self, f: FN) -> T
pub fn exposed_in_as_vec<T, Z, FN>(&self, f: FN) -> T
pub fn exposed_in_as_zvec<T, FN>(&self, f: FN) -> T
pub async fn exposed_in_as_str_async<T, Z, FN, FI>(&self, f: FN) -> T
pub async fn exposed_in_as_zstr_async<T, FN, FI>(&self, f: FN) -> T
pub async fn exposed_in_as_vec_async<T, Z, FN, FI>(&self, f: FN) -> T
pub async fn exposed_in_as_zvec_async<T, FN, FI>(&self, f: FN) -> T
Source§impl SecretValue
impl SecretValue
pub fn expose_json_value_as<T>(&self) -> Result<T, Error>where
T: for<'de> Deserialize<'de> + for<'de> Zeroize,
Trait Implementations§
Source§impl Clone for SecretValue
impl Clone for SecretValue
Source§fn clone(&self) -> SecretValue
fn clone(&self) -> SecretValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SecretValue
impl Debug for SecretValue
Source§impl Default for SecretValue
impl Default for SecretValue
Source§fn default() -> SecretValue
fn default() -> SecretValue
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SecretValue
impl<'de> Deserialize<'de> for SecretValue
Source§fn deserialize<D>(
deserializer: D,
) -> Result<SecretValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<SecretValue, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SecretValue
impl Display for SecretValue
Source§impl Drop for SecretValue
impl Drop for SecretValue
Source§impl From<&mut String> for SecretValue
impl From<&mut String> for SecretValue
Source§fn from(str: &mut String) -> SecretValue
fn from(str: &mut String) -> SecretValue
Converts to this type from the input type.
Source§impl From<&str> for SecretValue
impl From<&str> for SecretValue
Source§fn from(str: &str) -> SecretValue
fn from(str: &str) -> SecretValue
Converts to this type from the input type.
Source§impl From<String> for SecretValue
impl From<String> for SecretValue
Source§fn from(str: String) -> SecretValue
fn from(str: String) -> SecretValue
Converts to this type from the input type.
Source§impl Hash for SecretValue
impl Hash for SecretValue
Source§impl PartialEq for SecretValue
impl PartialEq for SecretValue
Source§impl Serialize for SecretValue
impl Serialize for SecretValue
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Zeroize for SecretValue
impl Zeroize for SecretValue
impl Eq for SecretValue
impl StructuralPartialEq for SecretValue
Auto Trait Implementations§
impl Freeze for SecretValue
impl RefUnwindSafe for SecretValue
impl Send for SecretValue
impl Sync for SecretValue
impl Unpin for SecretValue
impl UnwindSafe for SecretValue
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string
, but without panic on OOM.