zbus/proxy/
defaults.rs

1use zbus_names::{BusName, InterfaceName};
2use zvariant::ObjectPath;
3
4/// Trait for the default associated values of a proxy.
5///
6/// The trait is automatically implemented by the [`proxy`] macro on your behalf, and may be later
7/// used to retrieve the associated constants.
8///
9/// [`proxy`]: attr.proxy.html
10pub trait Defaults {
11    const INTERFACE: &'static Option<InterfaceName<'static>>;
12    const DESTINATION: &'static Option<BusName<'static>>;
13    const PATH: &'static Option<ObjectPath<'static>>;
14}
15
16impl Defaults for super::Proxy<'_> {
17    const INTERFACE: &'static Option<InterfaceName<'static>> = &None;
18    const DESTINATION: &'static Option<BusName<'static>> = &None;
19    const PATH: &'static Option<ObjectPath<'static>> = &None;
20}