Additional `TryFrom<OwnedValue>` implementations needed for UDisks2
Running the git version of xmlgen
on https://raw.githubusercontent.com/storaged-project/udisks/master/data/org.freedesktop.UDisks2.xml:
error[E0277]: the trait bound `HashMap<std::string::String, OwnedValue>: TryFrom<OwnedValue>` is not satisfied
--> src/udisks.rs:82:1
|
82 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.Drive")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `HashMap<std::string::String, OwnedValue>`
|
= help: the following implementations were found:
<HashMap<K, V, H> as TryFrom<OwnedValue>>
<HashMap<K, V, H> as TryFrom<zvariant::Dict<'k, 'v>>>
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>: TryFrom<OwnedValue>` is not satisfied
--> src/udisks.rs:390:1
|
390 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.Block")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>`
|
= help: the following implementations were found:
<Vec<OwnedValue> as TryFrom<OwnedValue>>
<Vec<T> as TryFrom<OwnedValue>>
<Vec<T> as TryFrom<zvariant::Array<'a>>>
<Vec<T> as TryFrom<zvariant::Value<'a>>>
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>: TryFrom<OwnedValue>` is not satisfied
--> src/udisks.rs:752:1
|
752 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.Encrypted")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>`
|
= help: the following implementations were found:
<Vec<OwnedValue> as TryFrom<OwnedValue>>
<Vec<T> as TryFrom<OwnedValue>>
<Vec<T> as TryFrom<zvariant::Array<'a>>>
<Vec<T> as TryFrom<zvariant::Value<'a>>>
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Vec<(OwnedObjectPath, i32, Vec<std::string::String>, u64, HashMap<std::string::String, OwnedValue>)>: TryFrom<OwnedValue>` is not satisfied
--> src/udisks.rs:829:1
|
829 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.MDRaid")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `Vec<(OwnedObjectPath, i32, Vec<std::string::String>, u64, HashMap<std::string::String, OwnedValue>)>`
|
= help: the following implementations were found:
<Vec<OwnedValue> as TryFrom<OwnedValue>>
<Vec<T> as TryFrom<OwnedValue>>
<Vec<T> as TryFrom<zvariant::Array<'a>>>
<Vec<T> as TryFrom<zvariant::Value<'a>>>
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0277]: the trait bound `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>: TryFrom<OwnedValue>` is not satisfied
--> src/udisks.rs:829:1
|
829 | #[dbus_proxy(interface = "org.freedesktop.UDisks2.MDRaid")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `TryFrom<OwnedValue>` is not implemented for `Vec<(std::string::String, HashMap<std::string::String, OwnedValue>)>`
|
= help: the following implementations were found:
<Vec<OwnedValue> as TryFrom<OwnedValue>>
<Vec<T> as TryFrom<OwnedValue>>
<Vec<T> as TryFrom<zvariant::Array<'a>>>
<Vec<T> as TryFrom<zvariant::Value<'a>>>
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 5 previous errors
I'm looking at how to implement these but it's not entirely clear how to make the TryFrom
implementations more general.