Module primitives

Source
Expand description

Blanket MsgpackTagged impls for scalar primitives.

Primitives don’t have struct fields or enum variants, so they have no tags and never go through serialize_struct / deserialize_struct. Their register_into is a no-op — they exist only to satisfy the T: MsgpackTagged bound that the macro propagates onto every tagged field’s type. The Tagged shape they advertise is a Product with empty fields, signalling “no on-the-wire structure of my own.”

PhantomData<T> lives here for the same reason: zero-sized, wire-irrelevant, never registers anything. The struct-field auto-skip in the derive still drops PhantomData fields from the wire, but inside enum variant payloads (and anywhere else that just needs the bound to hold transitively), this blanket impl is what makes things compose.

Macros§

impl_msgpack_tagged_for_primitive 🔒

Constants§

LEAF 🔒