logo

Derive Macro zvariant::TypeDict

source · []
#[derive(TypeDict)]
Expand description

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

Examples

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

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

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