CodecId

Trait CodecId 

pub trait CodecId {
    const CODEC_ID: u8;
}
Expand description

Stable, compile-time codec identity.

This is used by typed adapters (indexbus-typed) to stamp/validate the envelope header.

Required Associated Constants§

const CODEC_ID: u8

Stable identifier for this codec (v1 mapping).

This value is written into message envelopes and used to select a decoder.

Contract:

  • The value should remain stable for the lifetime of a v1 schema.
  • Two distinct codecs should not share an ID.

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.

Implementors§