dbus-server-address-parser 1.0.1

Library to encode and decode DBus server address
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::{escape::escape, guid::to_guid};
use crate::Launchd;
use std::fmt::{Display, Formatter, Result as FmtResult};

impl Display for Launchd {
    fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
        write!(f, "launchd:env={}", escape(&self.env))?;
        if let Some(guid) = &self.guid {
            write!(f, ",guid={}", to_guid(guid))
        } else {
            Ok(())
        }
    }
}