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§
Required Methods§
sourcefn status(&self) -> Option<&Self::Status>
fn status(&self) -> Option<&Self::Status>
Returns an optional reference to the status
of the object
sourcefn status_mut(&mut self) -> &mut Option<Self::Status>
fn status_mut(&mut self) -> &mut Option<Self::Status>
Returns an optional mutable reference to the status
of the object