dbus_server_address_parser/
autolaunch.rs

1use crate::Guid;
2
3/// This represents a DBus server address with the prefix [`autolaunch:`].
4///
5/// [`autolaunch:`]: https://dbus.freedesktop.org/doc/dbus-specification.html#meta-transports-autolaunch
6#[derive(Debug, Clone, PartialEq, Eq)]
7pub struct Autolaunch {
8    /// Scope of autolaunch (Windows only).
9    #[cfg(target_family = "windows")]
10    pub scope: Option<String>,
11    /// The GUID of the Address.
12    pub guid: Option<Guid>,
13}
14
15impl Autolaunch {
16    pub fn is_connectable(&self) -> bool {
17        true
18    }
19
20    #[cfg(target_family = "windows")]
21    pub fn is_listenable(&self) -> bool {
22        true
23    }
24
25    #[cfg(target_family = "unix")]
26    pub fn is_listenable(&self) -> bool {
27        false
28    }
29}