pub struct UnitWithStatus {
pub name: String,
pub scope: UnitScope,
pub description: String,
pub file_path: Option<Result<String, String>>,
pub load_state: String,
pub activation_state: String,
pub sub_state: String,
pub enablement_state: Option<String>,
}Fields§
§name: String§scope: UnitScope§description: String§file_path: Option<Result<String, String>>§load_state: String§activation_state: StringOne state, called the “activation state”, essentially describes what the unit is doing now. The two most common values for this state are active and inactive, though there are a few other possibilities. (Each unit type has its own set of “substates” that map to these activation states. For instance, service units can be running or stopped. Again, there’s a variety of other substates, and the list differs for each unit type.)
sub_state: StringThe sub state (a more fine-grained version of the active state that is specific to the unit type, which the active state is not)
enablement_state: Option<String>The other state all units have is called the “enablement state”. It describes how the unit might be automatically started in the future. A unit is enabled if it has been added to the requirements list of any other unit though symlinks in the filesystem. The set of symlinks to be created when enabling a unit is described by the unit’s [Install] section. A unit is disabled if no symlinks are present. Again there’s a variety of other values other than these two (e.g. not all units even have [Install] sections). Only populated when needed b/c this is much slower to get
Implementations§
Trait Implementations§
Source§impl Clone for UnitWithStatus
impl Clone for UnitWithStatus
Source§fn clone(&self) -> UnitWithStatus
fn clone(&self) -> UnitWithStatus
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more