pub struct Status {
pub status: Option<StatusSummary>,
pub code: u16,
pub message: String,
pub reason: String,
pub details: Option<StatusDetails>,
}
client
only.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) -> Status
pub fn with_details(self, details: StatusDetails) -> Status
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.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Status
impl<'de> Deserialize<'de> for Status
source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Status, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Status, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl Serialize for Status
impl Serialize for Status
source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnwindSafe for Status
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more