pub struct SecretRef {
pub context_id: String,
pub key: String,
}Expand description
Reference to a secret value.
Fields§
§context_id: StringContext ID containing the secret (use “.” for current context).
key: StringSecret key name.
Implementations§
Source§impl SecretRef
impl SecretRef
Sourcepub fn new(context_id: impl Into<String>, key: impl Into<String>) -> Self
pub fn new(context_id: impl Into<String>, key: impl Into<String>) -> Self
Create a new secret reference.
Sourcepub fn current(key: impl Into<String>) -> Self
pub fn current(key: impl Into<String>) -> Self
Create a reference to a secret in the current context.
Sourcepub fn is_current_context(&self) -> bool
pub fn is_current_context(&self) -> bool
Check if this references the current context.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SecretRef
impl<'de> Deserialize<'de> for SecretRef
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
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 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