dbus_server_address_parser/encode/
launchd.rs

1use super::{escape::escape, guid::to_guid};
2use crate::Launchd;
3use std::fmt::{Display, Formatter, Result as FmtResult};
4
5impl Display for Launchd {
6    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
7        write!(f, "launchd:env={}", escape(&self.env))?;
8        if let Some(guid) = &self.guid {
9            write!(f, ",guid={}", to_guid(guid))
10        } else {
11            Ok(())
12        }
13    }
14}