Crate msgpack_tagged

Source
Expand description

Tagged-map serialization format for Noir bytecode.

Design: issue #12554.

This crate currently provides:

Re-exports§

pub use deserializer::Deserializer;
pub use deserializer::msgpack_tagged_deserialize;
pub use serializer::Serializer;
pub use serializer::msgpack_tagged_serialize;

Modules§

containers 🔒
Blanket MsgpackTagged impls for stdlib container types.
deserializer
Tagged-map msgpack deserializer that wraps [rmp_serde::Deserializer].
primitives 🔒
Blanket MsgpackTagged impls for scalar primitives.
registry 🔒
Local registry of types participating in tagged-map serialization.
serializer
Tagged-map msgpack serializer that wraps [rmp_serde::Serializer].

Structs§

Entry
A registered type’s metadata. Stores only the type’s Tagged shape alongside a TypeId used to detect serde-name collisions between different Rust types.
Product
A product type — a fixed list of named, integer-tagged fields. Used for top-level structs/tuple structs and for an enum variant’s payload (a variant is structurally just a struct hung off a tag).
Sum
A sum type — a discriminated union of Variants.
TagRegistry
A registry of types participating in tagged-map serialization.
Variant
One variant of a sum type. Its payload is a single Product (possibly with no fields for unit and newtype variants — see VariantKind for the discriminator that distinguishes them).

Enums§

EncodingStrategy
On-wire shape for product types (structs, tuple structs, enum-variant payloads). Picked per-type on the Serializer (see Serializer::new / Serializer::with_strategy). Enum variants are always int-keyed under MsgpackTagged regardless of strategy — the strategy only affects struct shape.
Tagged
The wire shape of a tagged type, used both at the top level (in MsgpackTagged::TAGGED) and recursively inside variant payloads.
VariantKind
The shape of an enum variant’s payload, used by the wrapper to decide how to encode/decode the value carried under the variant tag.

Traits§

MsgpackTagged
A type that participates in the tagged-map wire format.

Functions§

type_name_basename
The basename component of std::any::type_name::<T>() — module path stripped, generic parameters dropped. Used by the strategy-override machinery to look up registered types by the same serde name that #[serde(rename = "...")] (or the bare type ident) maps to.

Type Aliases§

Tag
The integer tag used as a wire-level identifier for struct fields and enum variants. u8 keeps tags inside msgpack’s fixint range (0–127) at the 1-byte-per-tag encoding and rejects #[tag(N)] annotations with N > 255 at compile time.

Derive Macros§

MsgpackTagged