pub struct LocalConnection { /* private fields */ }
Expand description

A connection to D-Bus, thread local + async version

Implementations

Get the connection’s unique name.

It’s usually something like “:1.54”

Request a name on the D-Bus.

For detailed information on the flags and return values, see the libdbus documentation.

Release a previously requested name on the D-Bus.

Adds a new match to the connection, and sets up a callback when this message arrives.

If multiple MatchRules match the same message, then by default only the first will get the callback. This behaviour can be changed for signal messages by calling set_signal_match_mode.

The returned value can be used to remove the match.

Adds a new match to the connection, without setting up a callback when this message arrives.

Removes a match from the connection, without removing any callbacks.

Removes a previously added match and callback from the connection.

If true, configures the connection to send signal messages to all matching MatchRule filters added with add_match rather than just the first one. This comes with the following gotchas:

  • The messages might be duplicated, so the message serial might be lost (this is generally not a problem for signals).
  • Panicking inside a match callback might mess with other callbacks, causing them to be permanently dropped.
  • Removing other matches from inside a match callback is not supported.

This is false by default, for a newly-created connection.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.
Converts to this type from the input type.
Type of callback
Add a callback to be called in case a message matches. Read more
Remove a previously added callback.
Callback type
Sends a message and calls the callback when a reply is received.
Cancels a pending reply.
Internal helper function that creates a callback.
Get the internal timeout maker
Set the internal timeout maker
Set the wakeup call
Dispatches a message.
Dispatches all pending messages, without blocking. Read more
Schedules a message for sending. 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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.