Trait kube_core::ResourceExt [−][src]
pub trait ResourceExt: Resource { fn name(&self) -> String; fn namespace(&self) -> Option<String>; fn resource_version(&self) -> Option<String>; fn uid(&self) -> Option<String>; fn labels(&self) -> &BTreeMap<String, String>; fn labels_mut(&mut self) -> &mut BTreeMap<String, String>; fn annotations(&self) -> &BTreeMap<String, String>; fn annotations_mut(&mut self) -> &mut BTreeMap<String, String>; fn owner_references(&self) -> &[OwnerReference]; fn owner_references_mut(&mut self) -> &mut Vec<OwnerReference>; fn finalizers(&self) -> &[String]; fn finalizers_mut(&mut self) -> &mut Vec<String>; }
Expand description
Helper methods for resources.
Required methods
Returns the name of the resource, panicking if it is
missing. Use this function if you know that name is set, for example
when resource was received from the apiserver.
Because of .metadata.generateName
field, in other contexts name
may be missing.
For non-panicking alternative, you can directly read name
field
on the self.meta()
.
fn resource_version(&self) -> Option<String>
[src]
fn resource_version(&self) -> Option<String>
[src]The resource version
Unique ID (if you delete resource and then create a new resource with the same name, it will have different ID)
fn labels_mut(&mut self) -> &mut BTreeMap<String, String>
[src]
fn labels_mut(&mut self) -> &mut BTreeMap<String, String>
[src]Provides mutable access to the labels
fn annotations(&self) -> &BTreeMap<String, String>
[src]
fn annotations(&self) -> &BTreeMap<String, String>
[src]Returns resource annotations
fn annotations_mut(&mut self) -> &mut BTreeMap<String, String>
[src]
fn annotations_mut(&mut self) -> &mut BTreeMap<String, String>
[src]Provider mutable access to the annotations
fn owner_references(&self) -> &[OwnerReference]
[src]
fn owner_references(&self) -> &[OwnerReference]
[src]Returns resource owner references
fn owner_references_mut(&mut self) -> &mut Vec<OwnerReference>
[src]
fn owner_references_mut(&mut self) -> &mut Vec<OwnerReference>
[src]Provides mutable access to the owner references
fn finalizers(&self) -> &[String]
[src]
fn finalizers(&self) -> &[String]
[src]Returns resource finalizers
fn finalizers_mut(&mut self) -> &mut Vec<String>
[src]
fn finalizers_mut(&mut self) -> &mut Vec<String>
[src]Provides mutable access to the finalizers