Derive Macro zvariant::derive::TypeDict[][src]

#[derive(TypeDict)]

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

Examples

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

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

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