Closed zeenix closed 1 year ago
mentioned in commit 07d96b3d53ca9846e0fbbcc712027ee3cb768efa
@lichtfeind I tested my fixes with your code and everything works now. You'll have to make a few changes though:
use zbus::{
dbus_proxy,
Connection,
// Not required but best to use zvariant and macros through zbus directly.
// With the latest zvariant release this wasn't possible but I fixed the issue now.
zvariant::{DeserializeDict, SerializeDict, Type, Value, OwnedValue},
};
// You'll need to also use `Value` derive here, not just `OwnedValue` (an issue I need to look into).
// Also you can now just use `Type` instead of `DictType`.
#[derive(DeserializeDict, SerializeDict, Type, Debug, Value, OwnedValue)]
// This attribute needs to be specified now that `DictType` is not needed and is deprecated.
#[zvariant(signature = "dict")]
pub struct IP4Adress {
prefix: u32,
address: String,
}
In GitLab by @lichtfeind on Jan 21, 2022, 11:22
Yes it is now working. Thanks for the fast fix.
In GitLab by @lichtfeind on Jan 13, 2022, 14:06
When deserializing a
Array of (Dict of {String, Variant})
i getErr(Variant(IncorrectType))
.For a valid IP4Config path see in:
This is my minimum example:
main.rs