pub trait MsgpackTagged: 'static {
const TAGGED: Tagged;
// Required method
fn register_into(reg: &mut TagRegistry);
}Expand description
A type that participates in the tagged-map wire format.
Implementations are typically generated by #[derive(MsgpackTagged)] from the
msgpack_tagged_derive crate, but can also be hand-written for primitives,
container types, or shadow-DTO public types via #[tagged(via(WireType))].
The trait is metadata-only: it does not replace serde::Serialize /
serde::Deserialize. It sits alongside them and exposes the type’s wire
shape plus a recursive registry-build hook.
Required Associated Constants§
Sourceconst TAGGED: Tagged
const TAGGED: Tagged
The wire shape of this type — either a Product (struct/tuple
struct) or a Sum (enum). The derive macro emits this from
#[tag(N)] annotations; primitives and container types use a
Tagged::Product with empty fields, signalling they don’t appear
directly on the wire as a registry entry but still satisfy the bound.
Required Methods§
Sourcefn register_into(reg: &mut TagRegistry)
fn register_into(reg: &mut TagRegistry)
Recursively register this type and every tagged field type into a registry.
The macro emits the body: it calls reg.try_insert::<Self>(...) and, on
first insert, recurses into each generic and tagged-field type via their
own register_into. Idempotent — re-registering a type is a no-op.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.