pub struct UnitStates {
pub active_state: SystemdUnitActiveState,
pub load_state: SystemdUnitLoadState,
pub unhealthy: bool,
pub time_in_state_usecs: Option<u64>,
}Expand description
Per-unit state tracking combining active state, load state, and computed health. Ref: https://www.freedesktop.org/software/systemd/man/org.freedesktop.systemd1.html
Fields§
§active_state: SystemdUnitActiveStateCurrent active state of the unit (active, inactive, failed, activating, deactivating, reloading)
load_state: SystemdUnitLoadStateCurrent load state of the unit (loaded, error, masked, not_found)
unhealthy: boolComputed health flag: true when a loaded unit is not active, or when load state is error/not_found. Masked units are never marked unhealthy since masking is an intentional admin action. Optional config can ignore inactive oneshot services.
time_in_state_usecs: Option<u64>Microseconds elapsed since the unit’s most recent state change. None when time-in-state tracking is disabled in config (expensive D-Bus lookup per unit).
Trait Implementations§
Source§impl Clone for UnitStates
impl Clone for UnitStates
Source§fn clone(&self) -> UnitStates
fn clone(&self) -> UnitStates
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UnitStates
impl Debug for UnitStates
Source§impl Default for UnitStates
impl Default for UnitStates
Source§fn default() -> UnitStates
fn default() -> UnitStates
Source§impl<'de> Deserialize<'de> for UnitStates
impl<'de> Deserialize<'de> for UnitStates
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>,
Source§impl FieldNamesAsArray<4> for UnitStates
impl FieldNamesAsArray<4> for UnitStates
Source§const FIELD_NAMES_AS_ARRAY: [&'static str; 4]
const FIELD_NAMES_AS_ARRAY: [&'static str; 4]
Generated array of field names for UnitStates.
Source§impl PartialEq for UnitStates
impl PartialEq for UnitStates
Source§impl Serialize for UnitStates
impl Serialize for UnitStates
impl Eq for UnitStates
impl StructuralPartialEq for UnitStates
Auto Trait Implementations§
impl Freeze for UnitStates
impl RefUnwindSafe for UnitStates
impl Send for UnitStates
impl Sync for UnitStates
impl Unpin for UnitStates
impl UnsafeUnpin for UnitStates
impl UnwindSafe for UnitStates
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.