pub struct Status {
pub status: Option<StatusSummary>,
pub code: u16,
pub message: String,
pub reason: String,
pub details: Option<StatusDetails>,
}
Expand description
A Kubernetes status object
Fields§
§status: Option<StatusSummary>
Status of the operation
One of: Success
or Failure
- more info
code: u16
Suggested HTTP return code (0 if unset)
message: String
A human-readable description of the status of this operation
reason: String
A machine-readable description of why this operation is in the “Failure” status.
If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.
details: Option<StatusDetails>
Extended data associated with the reason.
Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type.
Implementations§
Source§impl Status
impl Status
Sourcepub fn with_details(self, details: StatusDetails) -> Self
pub fn with_details(self, details: StatusDetails) -> Self
Adds details to the Status
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Checks if this Status
represents success
Note that it is possible for Status
to be in indeterminate state
when both is_success
and is_failure
return false.
Sourcepub fn is_failure(&self) -> bool
pub fn is_failure(&self) -> bool
Checks if this Status
represents failure
Note that it is possible for Status
to be in indeterminate state
when both is_success
and is_failure
return false.