Enum wasmcloud_core::secrets::SecretValue
source · pub enum SecretValue {
String(String),
Bytes(Vec<u8>),
}
Variants§
Implementations§
source§impl SecretValue
impl SecretValue
sourcepub fn as_string(&self) -> Option<&str>
pub fn as_string(&self) -> Option<&str>
Utility function for retrieving a string slice from this SecretValue
, if possible.
If the secret does not contain a string, None
is returned
sourcepub fn as_bytes(&self) -> Option<&[u8]>
pub fn as_bytes(&self) -> Option<&[u8]>
Utility function for retrieving bytes from this SecretValue
, if possible.
If the secret does not contain bytes, None
is returned
Trait Implementations§
source§impl Clone for SecretValue
impl Clone for SecretValue
source§fn clone(&self) -> SecretValue
fn clone(&self) -> SecretValue
Returns a copy 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
Debug implementation that doesn’t log the secret value
source§impl<'de> Deserialize<'de> for SecretValue
impl<'de> Deserialize<'de> for SecretValue
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 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)