This crate provides derive macros helpers for [zvariant
]. The zvariant
crate re-exports these
macros for your convenience so you do not need to use this crate directly.
Status: Stable.
```rust use zvariant::{EncodingContext, fromslice, tobytes, Type}; use serde::{Deserialize, Serialize}; use byteorder::LE;
struct Struct<'s> { field1: u16, field2: i64, field3: &'s str, }
asserteq!(Struct::signature(), "(qxs)");
let s = Struct {
field1: 42,
field2: i64::maxvalue(),
field3: "hello",
};
let ctxt = EncodingContext::