macro_rules! property_type_signature {
    ($member:expr) => { ... };
    (member: $member:expr) => { ... };
    ($member:expr, $interface:expr) => { ... };
    (member: $member:expr, interface: $interface:expr) => { ... };
}
Expand description

Retrieve the signature of a property’s type.

Essentially a wrapper around [zbus_lockstep::get_property_type], but this macro tries to do with less arguments.

This macro will take a property name and return the signature of the property’s type.

If multiple interfaces offer the same member, you will need to specify the interface name as well.

This macro can be called with or without the interface name.

§Examples

use zbus_lockstep::property_type_signature;
use zvariant::Signature;

std::env::set_var("LOCKSTEP_XML_PATH", "../xml");
     
let sig = property_type_signature!("Features");
assert_eq!(&sig, &Signature::from_str_unchecked("as"));

The member name and/or interface name can be used tp identify the arguments:

let _sig = property_type_signature!(member: "Features", interface: "org.example.Node");