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 moreAuto Trait Implementations§
impl Freeze for UnitWithStatus
impl RefUnwindSafe for UnitWithStatus
impl Send for UnitWithStatus
impl Sync for UnitWithStatus
impl Unpin for UnitWithStatus
impl UnwindSafe for UnitWithStatus
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§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