pub struct ConnPath<'a, C> {
    pub conn: C,
    pub dest: BusName<'a>,
    pub path: Path<'a>,
    pub timeout: i32,
}
Expand description

A convenience struct that wraps connection, destination and path.

Useful if you want to make many method calls to the same destination path.

Fields

conn: C

Some way to access the connection, e g a &Connection or Rc

dest: BusName<'a>

Destination, i e what D-Bus service you’re communicating with

path: Path<'a>

Object path on the destination

timeout: i32

Timeout in milliseconds for blocking method calls

Implementations

Make a D-Bus method call, where you can append arguments inside the closure.

Emit a D-Bus signal, where you can append arguments inside the closure.

Emit a D-Bus signal, where the arguments are in a struct.

Make a method call using typed input and output arguments.

Example
use dbus::ffidisp::{Connection, BusType};

let conn = Connection::get_private(BusType::Session)?;
let dest = conn.with_path("org.freedesktop.DBus", "/", 5000);
let (has_owner,): (bool,) = dest.method_call("org.freedesktop.DBus", "NameHasOwner", ("dummy.name.without.owner",))?;
assert_eq!(has_owner, false);

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. 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 resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
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.