pub enum MaybeSecretRef {
String(String),
SecretRef(String),
}Expand description
Enumeration which holds a string or a secret reference which is not yet resolved.
Instantiation is done either directly, using deserialization or by matching a basic string to a particular pattern. Note that the former two allow simple strings to be instantiated that the latter with the pattern would normally map into secret reference.
This class is located in the pipeline-types crate because in future versions it will likely become an object within the API. Deserialization is implemented already for that reason.
Variants§
Implementations§
Source§impl MaybeSecretRef
impl MaybeSecretRef
Sourcepub fn new_using_pattern_match(value: String) -> MaybeSecretRef
pub fn new_using_pattern_match(value: String) -> MaybeSecretRef
Determines whether a given string value refers to a secret or is simply a string based on whether it matches the pattern.
A secret must follow the pattern: “${secret:secret-identifier}”
For example for a secret identified by “database-1-user”: “${secret:database-1-user}”
Any string value which does not follow the above pattern is determined to be a simple string.
Note that here is not checked whether the secret identifier can be resolved, nor is specified which requirements the resolver has for the identifier to be valid.
Trait Implementations§
Source§impl Clone for MaybeSecretRef
impl Clone for MaybeSecretRef
Source§fn clone(&self) -> MaybeSecretRef
fn clone(&self) -> MaybeSecretRef
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MaybeSecretRef
impl Debug for MaybeSecretRef
Source§impl<'de> Deserialize<'de> for MaybeSecretRef
impl<'de> Deserialize<'de> for MaybeSecretRef
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>,
Source§impl Display for MaybeSecretRef
impl Display for MaybeSecretRef
Source§impl Ord for MaybeSecretRef
impl Ord for MaybeSecretRef
Source§fn cmp(&self, other: &MaybeSecretRef) -> Ordering
fn cmp(&self, other: &MaybeSecretRef) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MaybeSecretRef
impl PartialEq for MaybeSecretRef
Source§impl PartialOrd for MaybeSecretRef
impl PartialOrd for MaybeSecretRef
Source§impl<'__s> ToSchema<'__s> for MaybeSecretRef
impl<'__s> ToSchema<'__s> 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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
key and return true if they are equal.