macro_rules! impl_member_interface_registry_string_and_match_rule_for_event {
($target_type:ty, $member_str:literal, $interface_str:literal, $registry_str:literal, $match_rule_str:literal) => { ... };
}Expand description
Implement DBusMember, DBusInterface, DBusMatchRule, and RegistryEventString
for a given event type.
This macro takes 5 arguments in the order:
- The target type
- The member string
- The interface string
- The registry string
- The match rule string
§Example
ⓘ
impl_member_interface_registry_string_and_match_rule_for_event!(
FocusEvent, "Focus", "org.a11y.atspi.Event.Focus", "focus",
"type='signal',interface='org.a11y.atspi.Event.Focus'");expands to:
ⓘ
impl DBusMember for FocusEvent {
const DBUS_MEMBER: &'static str = "Focus";
}
impl DBusInterface for FocusEvent {
const DBUS_INTERFACE: &'static str = "org.a11y.atspi.Event.Focus";
}
impl MatchRule for FocusEvent {
const MATCH_RULE: &'static str = "type='signal',interface='org.a11y.atspi.Event.Focus'";
}
impl RegistryEventString for FocusEvent {
const REGISTRY_STRING: &'static str = "focus";
}
impl DBusProperties for FocusEvent {}