Trait MsgpackTagged

Source
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§

Source

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§

Source

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.

Implementations on Foreign Types§

Source§

impl MsgpackTagged for bool

Source§

impl MsgpackTagged for char

Source§

impl MsgpackTagged for f32

Source§

impl MsgpackTagged for f64

Source§

impl MsgpackTagged for i8

Source§

impl MsgpackTagged for i16

Source§

impl MsgpackTagged for i32

Source§

impl MsgpackTagged for i64

Source§

impl MsgpackTagged for i128

Source§

impl MsgpackTagged for isize

Source§

impl MsgpackTagged for u8

Source§

impl MsgpackTagged for u16

Source§

impl MsgpackTagged for u32

Source§

impl MsgpackTagged for u64

Source§

impl MsgpackTagged for u128

Source§

impl MsgpackTagged for ()

Source§

impl MsgpackTagged for usize

Source§

impl MsgpackTagged for String

Source§

impl<K: MsgpackTagged, V: MsgpackTagged> MsgpackTagged for BTreeMap<K, V>

Source§

impl<T0: MsgpackTagged> MsgpackTagged for (T0,)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged> MsgpackTagged for (T0, T1)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged> MsgpackTagged for (T0, T1, T2)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged, T3: MsgpackTagged> MsgpackTagged for (T0, T1, T2, T3)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged, T3: MsgpackTagged, T4: MsgpackTagged> MsgpackTagged for (T0, T1, T2, T3, T4)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged, T3: MsgpackTagged, T4: MsgpackTagged, T5: MsgpackTagged> MsgpackTagged for (T0, T1, T2, T3, T4, T5)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged, T3: MsgpackTagged, T4: MsgpackTagged, T5: MsgpackTagged, T6: MsgpackTagged> MsgpackTagged for (T0, T1, T2, T3, T4, T5, T6)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged, T3: MsgpackTagged, T4: MsgpackTagged, T5: MsgpackTagged, T6: MsgpackTagged, T7: MsgpackTagged> MsgpackTagged for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged, T3: MsgpackTagged, T4: MsgpackTagged, T5: MsgpackTagged, T6: MsgpackTagged, T7: MsgpackTagged, T8: MsgpackTagged> MsgpackTagged for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged, T3: MsgpackTagged, T4: MsgpackTagged, T5: MsgpackTagged, T6: MsgpackTagged, T7: MsgpackTagged, T8: MsgpackTagged, T9: MsgpackTagged> MsgpackTagged for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged, T3: MsgpackTagged, T4: MsgpackTagged, T5: MsgpackTagged, T6: MsgpackTagged, T7: MsgpackTagged, T8: MsgpackTagged, T9: MsgpackTagged, T10: MsgpackTagged> MsgpackTagged for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)

Source§

impl<T0: MsgpackTagged, T1: MsgpackTagged, T2: MsgpackTagged, T3: MsgpackTagged, T4: MsgpackTagged, T5: MsgpackTagged, T6: MsgpackTagged, T7: MsgpackTagged, T8: MsgpackTagged, T9: MsgpackTagged, T10: MsgpackTagged, T11: MsgpackTagged> MsgpackTagged for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)

Source§

impl<T: 'static> MsgpackTagged for PhantomData<T>

Source§

impl<T: MsgpackTagged> MsgpackTagged for Option<T>

Source§

impl<T: MsgpackTagged> MsgpackTagged for Box<T>

Source§

impl<T: MsgpackTagged> MsgpackTagged for BTreeSet<T>

Source§

impl<T: MsgpackTagged> MsgpackTagged for Vec<T>

Source§

impl<T: MsgpackTagged, const N: usize> MsgpackTagged for [T; N]

Implementors§