pub fn bus_watch_name_on_connection<NameAppeared, NameVanished>(
    connection: &DBusConnection,
    name: &str,
    flags: BusNameWatcherFlags,
    name_appeared: NameAppeared,
    name_vanished: NameVanished
) -> WatcherId
where NameAppeared: Fn(DBusConnection, &str, &str) + Send + Sync + 'static, NameVanished: Fn(DBusConnection, &str) + Send + Sync + 'static,
Expand description

Like g_bus_watch_name() but takes a DBusConnection instead of a BusType.

connection

A DBusConnection.

name

The name (well-known or unique) to watch.

flags

Flags from the BusNameWatcherFlags enumeration.

name_appeared_handler

Handler to invoke when name is known to exist or None.

name_vanished_handler

Handler to invoke when name is known to not exist or None.

Returns

An identifier (never 0) that can be used with g_bus_unwatch_name() to stop watching the name.