#[repr(i32)]pub enum HealthStatus {
Unspecified = 0,
Nominal = 1,
Degraded = 2,
Critical = 3,
Failed = 4,
}Expand description
Health status enumeration
Variants§
Unspecified = 0
Nominal = 1
Operating normally
Degraded = 2
Degraded but operational
Critical = 3
Critical failure imminent
Failed = 4
Failed/offline
Implementations§
Source§impl HealthStatus
impl HealthStatus
Source§impl HealthStatus
impl HealthStatus
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for HealthStatus
impl Clone for HealthStatus
Source§fn clone(&self) -> HealthStatus
fn clone(&self) -> HealthStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HealthStatus
impl Debug for HealthStatus
Source§impl Default for HealthStatus
impl Default for HealthStatus
Source§fn default() -> HealthStatus
fn default() -> HealthStatus
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HealthStatus
impl<'de> Deserialize<'de> for HealthStatus
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<HealthStatus> for i32
impl From<HealthStatus> for i32
Source§fn from(value: HealthStatus) -> i32
fn from(value: HealthStatus) -> i32
Converts to this type from the input type.
Source§impl Hash for HealthStatus
impl Hash for HealthStatus
Source§impl Ord for HealthStatus
impl Ord for HealthStatus
Source§fn cmp(&self, other: &HealthStatus) -> Ordering
fn cmp(&self, other: &HealthStatus) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for HealthStatus
impl PartialEq for HealthStatus
Source§fn eq(&self, other: &HealthStatus) -> bool
fn eq(&self, other: &HealthStatus) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for HealthStatus
impl PartialOrd for HealthStatus
Source§impl Serialize for HealthStatus
impl Serialize for HealthStatus
Source§impl TryFrom<i32> for HealthStatus
impl TryFrom<i32> for HealthStatus
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<HealthStatus, UnknownEnumValue>
fn try_from(value: i32) -> Result<HealthStatus, UnknownEnumValue>
Performs the conversion.
impl Copy for HealthStatus
impl Eq for HealthStatus
impl StructuralPartialEq for HealthStatus
Auto Trait Implementations§
impl Freeze for HealthStatus
impl RefUnwindSafe for HealthStatus
impl Send for HealthStatus
impl Sync for HealthStatus
impl Unpin for HealthStatus
impl UnsafeUnpin for HealthStatus
impl UnwindSafe for HealthStatus
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
Mutably borrows from an owned value. Read more