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 [`macro@crate::proxy`] macro on your behalf, and
7/// may be later used to retrieve the associated constants.
8pub trait Defaults {
9    const INTERFACE: &'static Option<InterfaceName<'static>>;
10    const DESTINATION: &'static Option<BusName<'static>>;
11    const PATH: &'static Option<ObjectPath<'static>>;
12}
13
14impl Defaults for super::Proxy<'_> {
15    const INTERFACE: &'static Option<InterfaceName<'static>> = &None;
16    const DESTINATION: &'static Option<BusName<'static>> = &None;
17    const PATH: &'static Option<ObjectPath<'static>> = &None;
18}