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
}

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

impl<'a> MatchRule<'a>[src]

pub fn match_str(&self) -> String[src]

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

pub fn matches(&self, msg: &Message) -> bool[src]

Returns whether or not the message matches the rule.

pub fn new() -> Self[src]

Create a new struct which matches every message.

pub fn new_method_call() -> Self[src]

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

pub fn new_signal<I: Into<Interface<'a>>, N: Into<Member<'a>>>(
    intf: I,
    name: N
) -> Self
[src]

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

pub fn static_clone(&self) -> MatchRule<'static>[src]

Returns a clone with no borrowed references

Trait Implementations

impl<'a> Clone for MatchRule<'a>[src]

impl<'a> Debug for MatchRule<'a>[src]

impl<'a> Default for MatchRule<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for MatchRule<'a>[src]

impl<'a> Send for MatchRule<'a>[src]

impl<'a> Sync for MatchRule<'a>[src]

impl<'a> Unpin for MatchRule<'a>[src]

impl<'a> UnwindSafe for MatchRule<'a>[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.