Derive Macro zvariant_derive::TypeDict

source ·
#[derive(TypeDict)]
👎Deprecated since 3.1.0: Please use Type macro with #[zvariant(signature = "dict")] attribute instead.
Expand description

Derive macro to add Type implementation to structs serialized as a{sv} type.

Examples

use zvariant::{Signature, Type, TypeDict};

#[allow(deprecated)]
#[derive(TypeDict)]
struct Struct {
    field: u32,
}

assert_eq!(Struct::signature(), Signature::from_str_unchecked("a{sv}"));