Expand description
Schema-aware forward conversion from CDC wire formats into
Value.
Every supported wire source (pg_walstream, wal2json, maxwell)
carries per-column type metadata alongside the raw value bytes. This
module funnels the three sources through one shared decoding contract
so users can register a single type-to-decoder mapping and consume
multiple wire formats interchangeably.
§Shape
WireSource(sealed): per-source marker with an associated payload struct and type key. Implemented byPgWalstream,Wal2Json,Maxwell.Decoder: one implementation per (source, semantic) pair. Zero-sized unit types for stateless decoders (BoolDecoder,IntDecoder, …), state-carrying structs for user config.WireAdapter: single-method dispatcher fed a per-column payload, returns aValue.TypeMap: generic hashmap-backedWireAdapterimplementation keyed bySrc::TypeKey. The primary user-facing type.TypeMapDefaults: per-sourcedefaults()builder for aTypeMappre-populated with the crate’s self-evident mappings.
Structs§
- Bool
Decoder - Decoder for boolean columns.
- Date
Verbatim Decoder - Decoder for
date. Preserves the wire text verbatim. - Decimal
Text Decoder - Decoder for
numeric/decimalcolumns, preserving precision asValue::Text. - Int64
Overflow ToText Decoder - Decoder for integer columns whose wire values may exceed
i64. Values fittingi64produceValue::Integer, values above produceValue::Textwith the base-10 digits preserved. - IntDecoder
- Decoder for integer columns fitting in
i64. - Interval
Verbatim Decoder - Decoder for
interval. Preserves the wire text verbatim. - Json
Canonical Decoder - Decoder for
json/jsonbthat canonicalizes into sorted-key compact JSON text. - Json
Verbatim Decoder - Decoder for
json/jsonb. Preserves the wire form verbatim asValue::Text. - MySql
Binary Decoder - Decoder for MySQL binary-family columns (base64 on the wire).
- Null
Decoder - Decoder producing
Value::Nullregardless of the payload’s non-null contents. Registered internally when the payload’s null discriminator is set. Users normally do not register this directly. - PgBytea
Binary Decoder - Decoder for pg_walstream binary-mode BYTEA.
- PgBytea
Text Mode Decoder - Decoder for pg_walstream text-mode BYTEA (
\xHEXform). - Real
Decoder - Decoder for floating-point columns.
- Text
Decoder - Decoder for text-affinity columns.
- Time
Verbatim Decoder - Decoder for
time/timetz. Preserves the wire text verbatim. - Timestamp
TzVerbatim Decoder - Decoder for
timestamptz. Preserves the wire text verbatim. - Timestamp
Verbatim Decoder - Decoder for
timestamp(without time zone). Preserves the wire text verbatim. - TypeMap
- Generic type-to-decoder registry.
- Uuid
Blob16 Decoder - Decoder rendering UUID wire text into a 16-byte
Value::Blob. - Uuid
Text36 Decoder - Decoder rendering UUID wire text into a verbatim
Value::Text(36).
Enums§
- Decode
Error - Failure modes shared across every
wire::Decoderimplementation.
Traits§
- Decoder
- Converts a per-column payload into a
Value. - Digestable
- One CDC wire event digested via
DiffSetBuilder::digest. - Type
MapDefaults - Per-source companion trait providing a pre-populated
TypeMapwith every self-evident mapping the crate ships. - Wire
Adapter - Decodes one per-column payload into a
Value. - Wire
Column Types - Schema-side source-native type key for one column of one table.
- Wire
Schema - Table-name lookup for the
DiffSetBuilder::digestentry point. - Wire
Source - Per-format marker naming a CDC wire source.