k8s_openapi_ext/get/
configmap.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use super::*;

pub trait ConfigMapGetExt {
    fn myself(&self) -> &corev1::ConfigMap;

    fn data(&self) -> Option<&BTreeMap<String, String>> {
        self.myself().data.as_ref()
    }

    fn binary_data(&self) -> Option<&BTreeMap<String, ByteString>> {
        self.myself().binary_data.as_ref()
    }

    fn immutable(&self) -> Option<bool> {
        self.myself().immutable
    }
}

impl ConfigMapGetExt for corev1::ConfigMap {
    #[inline(always)]
    fn myself(&self) -> &corev1::ConfigMap {
        self
    }
}