Struct dbus::message::MatchRule[][src]

pub struct MatchRule<'a> {
    pub msg_type: Option<MessageType>,
    pub sender: Option<BusName<'a>>,
    pub strict_sender: bool,
    pub path: Option<Path<'a>>,
    pub path_is_namespace: bool,
    pub interface: Option<Interface<'a>>,
    pub member: Option<Member<'a>>,
    pub eavesdrop: bool,
    // some fields omitted
}
Expand description

A “match rule”, that can match Messages on its headers.

A field set to “None” means no filter for that header, a field set to “Some(_)” must match exactly.

Fields

msg_type: Option<MessageType>

Match on message type (you typically want to do this)

sender: Option<BusName<'a>>

Match on message sender

strict_sender: bool

If false (the default), match if sender could possibly match, due to mismatch between unique names and taken bus names

path: Option<Path<'a>>

Match on message object path

path_is_namespace: bool

If true, will match all subpaths to the path as well as the path itself. Defaults to false.

interface: Option<Interface<'a>>

Match on message interface

member: Option<Member<'a>>

Match on message member (signal or method name)

eavesdrop: bool

If true, also receive messages not intended for us. Defaults to false.

Implementations

Make a string which you can use in the call to “add_match”.

Returns whether or not the message matches the rule.

Create a new struct which matches every message.

Create a new struct which matches every incoming method call message.

Create a new struct which matches signals on the interface and member name.

Returns a clone with no borrowed references

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.