Trait HasMatchRule

Source
pub trait HasMatchRule {
    const MATCH_RULE_STRING: &'static str;
}
Expand description

A specific trait only to define match rules. This is useful for event wrappers like [crate::events::ObjectEvents], which, while it does not have other information required to implement the crate::BusProperties trait, you can indeed add a match rule to the DBus connection to capture all sub events of [crate::events::ObjectEvents].

This trait is not object-safe.

Required Associated Constants§

Source

const MATCH_RULE_STRING: &'static str

A static match rule string for DBus. This should usually be a string that looks like this: "type='signal',interface='org.a11y.atspi.Event.Object',member='PropertyChange'"; This should be deprecated in favour of composing the string from BusProperties::DBUS_MEMBER and BusProperties::DBUS_INTERFACE.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl HasMatchRule for EventListenerEvents

Source§

const MATCH_RULE_STRING: &'static str = "type='signal',interface='org.a11y.atspi.Event.Registry'"

Source§

impl<T> HasMatchRule for T
where T: BusProperties,

Source§

const MATCH_RULE_STRING: &'static str = <T as BusProperties>::MATCH_RULE_STRING