pub trait HasSpec {
    type Spec;
    fn spec(&self) -> &Self::Spec;
fn spec_mut(&mut self) -> &mut Self::Spec; }
Expand description

A trait to access the spec of a Kubernetes resource.

Some built-in Kubernetes resources and all custom resources do have a spec field. This trait can be used to access this field.

This trait is automatically implemented by the kube-derive macro and is not currently implemented for the Kubernetes API objects from k8s_openapi.

Note: Not all Kubernetes resources have a spec (e.g. ConfigMap, Secret, …).

Associated Types

The type of the spec of this resource

Required methods

Returns a reference to the spec of the object

Returns a mutable reference to the spec of the object

Implementors