Expand description
Encoders that convert captured bus messages into canonical payload bytes.
Each registered encoder is responsible for two outputs:
- The canonical payload bytes, written verbatim into the entry’s
payloadfield. The reader pairs the bytes withcrate::PayloadTypeto dispatch the matching decoder. - The sidecar
IndexKeys the writer commits in the same backend transaction so forensics scans byclient_order_idorvenue_order_idresolve to a committedseqrather than missing entries the reader can observe before the indices catch up.
The trait is type-erased so the registry can lookup by std::any::TypeId; concrete
encoders are typed via the TypedEncoder adapter and avoid downcasting at the call
site.
Structs§
- Encoded
Payload - The canonical payload plus sidecar indices an encoder produces for one captured message.
- Typed
Encoder - A typed wrapper that adapts a
Fn(&T) -> Result<EncodedPayload, EncodeError>toEncode.
Enums§
- Encode
Error - Errors returned by an
Encodeimplementation.
Traits§
- Encode
- A type-erased encoder used by the registry.