#[derive(Debug, Clone, Default)]
pub struct DaemonMarkers {
pub(crate) service_accounts: Vec<String>,
pub(crate) windows_service_env: Option<String>,
}
impl DaemonMarkers {
#[must_use]
pub fn new() -> Self {
Self::default()
}
#[must_use]
pub fn service_account(mut self, name: impl Into<String>) -> Self {
self.service_accounts.push(name.into());
self
}
#[must_use]
pub fn windows_service_env(mut self, variable: impl Into<String>) -> Self {
self.windows_service_env = Some(variable.into());
self
}
#[must_use]
pub fn is_daemon(&self) -> bool {
crate::platform::is_daemon_impl(self)
}
}