#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SystemdUnitStatus {
pub unit: String,
pub active_state: Option<String>,
pub sub_state: Option<String>,
pub load_state: Option<String>,
pub description: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SystemdUnitFile {
pub name: String,
pub state: Option<String>,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SystemdDependency {
pub unit: String,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SystemdJournal {
pub output: String,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct SystemdResourceLimit {
pub property: String,
pub value: String,
}
impl SystemdResourceLimit {
pub fn new(property: impl Into<String>, value: impl Into<String>) -> Self {
Self {
property: property.into(),
value: value.into(),
}
}
pub fn assignment(&self) -> String {
format!("{}={}", self.property, self.value)
}
}