Struct dbus_async::DBus[][src]

pub struct DBus { /* fields omitted */ }
Expand description

This struct represents an object to communicate with the DBus daemon.

Implementations

Connect to the session DBus.

If the first argument (introspectable) is true then the Peer is introspectable. If the second argument (peer) is true then the Peer has the org.freedesktop.DBus.Peer.

The DBUS_SESSION_BUS_ADDRESS environment variable have to be defined.

Connect to the system DBus.

If the first argument (introspectable) is true then the Peer is introspectable. If the second argument (peer) is true then the Peer has the org.freedesktop.DBus.Peer.

If there DBUS_SYSTEM_BUS_ADDRESS environment variable is defined then this path will be used, else unix:path=/var/run/dbus/system_bus_socket.

Connect to the specific (addressses) DBus daemon.

If the second argument (introspectable) is true then the Peer is introspectable. If the third argument (peer) is true then the Peer has the org.freedesktop.DBus.Peer.

Send a Message.

Send a Message and wait for a response.

The Message have to be a MessageCall.

Send a Message and specify a channel, where the response should be send.

This function returns the serial number of the Message. This is useful, where the the response and signals have to be processed in order.

Register a name for the peer. This calls the RequestName(String, UInt32) method of the DBus daemon.

Add a channel to a specific ObjectPath.

The channel will receive all MethodCall messages for the specified ObjectPath.

If there is already channel added for this ObjectPath then it will be replace. So the old channel will not receive any MethodCall messages for the ObjectPath anymore.

Delete the channel for a specific ObjectPath (see add_method_call).

Even if there is no channel for this ObjectPath the function will return Ok().

Delete the channel for every ObjectPath, which the given sender is connected to (see add_method_call).

Delete the channel for every ObjectPath, which the given sender is connected to (see add_method_call).

Add a channel to a specific Interface.

The channel will only receive all MethodCall messages for the specified Interface, if there is no channel by the ObjectPath.

If there is already channel added for this Interface then it will be replace. So the old channel will not receive any MethodCall messages for the Interface anymore.

Delete the channel for every Interface, which the given sender is connected to (see add_method_call_interface).

Delete the channel for every Interface, which the given sender is connected to (see add_method_call_interface).

Add a channel to a specific ObjectPath.

The channel will receive all Signal messages for the specified ObjectPath.

The second argument specify a closure to filter the Message. If the closure returns true then the Message will not be send to the channel.

There can be multiple channels, which will receive message of the specific ObjectPath.

Delete the channel for every ObjectPath, which the given sender is connected to (see add_signal).

Delete the channel for every ObjectPath, which the given sender is connected to (see add_signal).

Add a channel to a specific MatchRules.

The channel will receive all message, which match the given MatchRules.

Delete the channel for every MatchRules, which the given sender is connected to (see add_match_rules).

Delete the channel for every MatchRules, which the given sender is connected to (see add_match_rules).

List all ObjectPaths under the given ObjectPath.

This will only list the ObjectPath for the MethodCall messages (see add_method_call).

Close the DBus connection.

Get the current path of the DBus daemon.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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)

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.