pub struct SecretReference { /* private fields */ }Expand description
Reference to a secret in a secret provider.
This struct is used to identify secrets without containing the actual secret value. It consists of a secret reference string and an optional provider name.
§Example
use regent_sdk::secrets::SecretReference;
// Reference to a secret in the default provider
let ref1 = SecretReference::from("my_secret", None);
// Reference to a secret in a specific provider
let ref2 = SecretReference::from("my_secret", Some("aws".to_string()));Implementations§
Source§impl SecretReference
impl SecretReference
Sourcepub fn from(sec_ref: &str, provider: Option<String>) -> Self
pub fn from(sec_ref: &str, provider: Option<String>) -> Self
Create a new secret reference.
§Arguments
sec_ref- The reference/identifier for the secretprovider- Optional name of the secret provider
§Example
use regent_sdk::secrets::SecretReference;
// Use default provider
let ref1 = SecretReference::from("password", None);
// Use specific provider
let ref2 = SecretReference::from("api_key", Some("aws".to_string()));Trait Implementations§
Source§impl Clone for SecretReference
impl Clone for SecretReference
Source§fn clone(&self) -> SecretReference
fn clone(&self) -> SecretReference
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SecretReference
impl Debug for SecretReference
Source§impl<'de> Deserialize<'de> for SecretReference
impl<'de> Deserialize<'de> for SecretReference
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
Source§impl PartialEq for SecretReference
impl PartialEq for SecretReference
Source§impl Serialize for SecretReference
impl Serialize for SecretReference
impl StructuralPartialEq for SecretReference
Auto Trait Implementations§
impl Freeze for SecretReference
impl RefUnwindSafe for SecretReference
impl Send for SecretReference
impl Sync for SecretReference
impl Unpin for SecretReference
impl UnsafeUnpin for SecretReference
impl UnwindSafe for SecretReference
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