Expand description
Procedural macros for pack-io.
Three derives are provided:
#[derive(Serialize)]— implementspack_io::Serialize.#[derive(Deserialize)]— implementspack_io::Deserialize(owning).#[derive(DeserializeView)]— implementspack_io::DeserializeViewfor types whose fields borrow from the input buffer (&'a str,&'a [u8], primitives).
All three work on structs (named, tuple, unit) and enums (any variant
shape). Field order in the source code is the encoded byte order; the
wire format adds a varint(variant_index) prefix for enums.
This crate is not intended to be used directly — depend on
pack-io with the derive feature instead, which re-exports the
macros at pack_io::{Serialize, Deserialize, DeserializeView}.
Derive Macros§
- Deserialize
- Derive
pack_io::Deserializefor a struct or enum (owning decode). - Deserialize
View - Derive
pack_io::DeserializeViewfor a struct or enum (zero-copy decode). - Serialize
- Derive
pack_io::Serializefor a struct or enum.