pub enum MaybeSecretRef {
String(String),
SecretRef(SecretRef),
}Variants§
Implementations§
Source§impl MaybeSecretRef
impl MaybeSecretRef
Sourcepub fn new(value: String) -> Result<MaybeSecretRef, MaybeSecretRefParseError>
pub fn new(value: String) -> Result<MaybeSecretRef, MaybeSecretRefParseError>
Determines whether a string is just a plain string or a reference to a secret.
- Secret reference: any string which starts with
${secret:and ends with}is regarded as an attempt to declare a secret reference - Plain string: any other string
A secret reference must follow the following pattern:
${secret:<provider>:<identifier>}
An error is returned if a string is regarded as a secret reference (see above), but:
- Specifies a
<provider>which does not exist - Specifies a
<identifier>which does not meet the provider-specific requirements
Supported providers and their identifier expectations:
${secret:kubernetes:<name>/<data key>}
Note that here is not checked whether the secret reference can actually be resolved.
Trait Implementations§
Source§impl Clone for MaybeSecretRef
impl Clone for MaybeSecretRef
Source§fn clone(&self) -> MaybeSecretRef
fn clone(&self) -> MaybeSecretRef
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 MaybeSecretRef
impl Debug for MaybeSecretRef
Source§impl Display for MaybeSecretRef
impl Display for MaybeSecretRef
Source§impl PartialEq for MaybeSecretRef
impl PartialEq for MaybeSecretRef
impl Eq for MaybeSecretRef
impl StructuralPartialEq for MaybeSecretRef
Auto Trait Implementations§
impl Freeze for MaybeSecretRef
impl RefUnwindSafe for MaybeSecretRef
impl Send for MaybeSecretRef
impl Sync for MaybeSecretRef
impl Unpin for MaybeSecretRef
impl UnwindSafe for MaybeSecretRef
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.