How to make sense of dbus arguments

I want to use dbus to list all removable devices. The UDisks2 specs defines GetBlockDevices method on org.freedesktop.UDisks2.Manager interface. It's defined as follows:

GetBlockDevices (IN  a{sv} options,
                 OUT ao    block_objects);

The "in" parameter a{sv}, is (if I am not mistaken) a HashMap.

However the Key and the Value type does not make any sense to me. I set up my dbus cunnection as follows:

fn main() -> Result<(), Box<dyn std::error::Error>> {
    use dbus::blocking::{Connection, Proxy};

    let conn = Connection::new_system()?;
    let proxy = Proxy::new(
    let devices = proxy.method_call(
        // ?? ("in" arg goes here)

upon further inspection I deduced that the type should be std::collections::HashMap::<&str, dbus::arg::Variant<Box<dyn dbus::arg::RefArg>>>()

However it looks like I need to put it inside a tuple (No idea how or why), looking at the generated code:

Any pointers?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.