kube_core::object

Trait HasStatus

source
pub trait HasStatus {
    type Status;

    // Required methods
    fn status(&self) -> Option<&Self::Status>;
    fn status_mut(&mut self) -> &mut Option<Self::Status>;
}
Expand description

A trait to access the status of a Kubernetes resource.

Some built-in Kubernetes resources and custom resources do have a status 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 status (e.g. ConfigMap, Secret, …).

Required Associated Types§

source

type Status

The type of the status object

Required Methods§

source

fn status(&self) -> Option<&Self::Status>

Returns an optional reference to the status of the object

source

fn status_mut(&mut self) -> &mut Option<Self::Status>

Returns an optional mutable reference to the status of the object

Implementors§

source§

impl<P, U> HasStatus for Object<P, U>
where P: Clone, U: Clone,