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

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

Abstraction over different connections that receive data

Associated Types

type F

Type of callback

Loading content...

Required methods

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

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

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

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

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...