k8s_openapi_ext/ext/
secret_reference.rs

1use super::*;
2
3pub trait SecretReferenceExt {
4    fn new(name: impl ToString) -> Self;
5    fn namespace(self, namespace: impl ToString) -> Self;
6}
7
8impl SecretReferenceExt for corev1::SecretReference {
9    fn new(name: impl ToString) -> Self {
10        let name = Some(name.to_string());
11        Self { name, ..default() }
12    }
13
14    fn namespace(self, namespace: impl ToString) -> Self {
15        let namespace = Some(namespace.to_string());
16        Self { namespace, ..self }
17    }
18}