[][src]Trait kube::api::Meta

pub trait Meta: Metadata {
    fn meta(&self) -> &ObjectMeta;
fn name(&self) -> String;
fn namespace(&self) -> Option<String>;
fn resource_ver(&self) -> Option<String>; }

An accessor trait for Metadata

This for a subset of Kubernetes type that do not end in List These types, using ObjectMeta, SHOULD all have required properties:

  • .metadata
  • .metadata.name And these optional properties:
  • .metadata.namespace
  • .metadata.resource_version

This avoids a bunch of the unnecessary unwrap mechanics for apps

Required methods

fn meta(&self) -> &ObjectMeta

Metadata that all persisted resources must have

fn name(&self) -> String

The name of the resource

fn namespace(&self) -> Option<String>

The namespace the resource is in

fn resource_ver(&self) -> Option<String>

Tthe resource version

Loading content...

Implementors

impl<K> Meta for K where
    K: Metadata<Ty = ObjectMeta>, 
[src]

Implement accessor trait for any ObjectMeta-using Kubernetes Resource

Loading content...