[][src]Trait dbus::channel::MatchingReceiver

pub trait MatchingReceiver {
    type F;
    pub fn start_receive(&self, m: MatchRule<'static>, f: Self::F) -> Token;
pub fn stop_receive(
        &self,
        id: Token
    ) -> Option<(MatchRule<'static>, Self::F)>; }

Abstraction over different connections that receive data

Associated Types

type F[src]

Type of callback

Loading content...

Required methods

pub fn start_receive(&self, m: MatchRule<'static>, f: Self::F) -> Token[src]

Add a callback to be called in case a message matches.

Returns an id that can be used to remove the callback.

pub fn stop_receive(&self, id: Token) -> Option<(MatchRule<'static>, Self::F)>[src]

Remove a previously added callback.

Loading content...

Implementors

impl MatchingReceiver for dbus::blocking::Connection[src]

type F = Box<dyn FnMut(Message, &Connection) -> bool + Send + 'static>

impl MatchingReceiver for dbus::blocking::LocalConnection[src]

type F = Box<dyn FnMut(Message, &LocalConnection) -> bool + 'static>

impl MatchingReceiver for dbus::blocking::SyncConnection[src]

type F = Box<dyn FnMut(Message, &SyncConnection) -> bool + Send + Sync + 'static>

impl MatchingReceiver for dbus::nonblock::Connection[src]

type F = Box<dyn FnMut(Message, &Connection) -> bool + Send + 'static>

impl MatchingReceiver for dbus::nonblock::LocalConnection[src]

type F = Box<dyn FnMut(Message, &LocalConnection) -> bool + 'static>

impl MatchingReceiver for dbus::nonblock::SyncConnection[src]

type F = Box<dyn FnMut(Message, &SyncConnection) -> bool + Send + 'static>

Loading content...