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

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 is 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[src]

Metadata that all persisted resources must have

fn name(&self) -> String[src]

The name of the resource

fn namespace(&self) -> Option<String>[src]

The namespace the resource is in

fn resource_ver(&self) -> Option<String>[src]

The 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...