Expand description
Buffa wire-format helpers for #[derive(Event)] codegen.
EventSchema::encode_payload writes the buffa-encoded payload bytes
that downstream sinks (Parquet, ClickHouse, OTLP) and the runtime
scrubber decode. Spec 12 § 1.2 requires the Rust-first authoring
path (#[derive(Event)]) and the proto-first path (obs-build) to
produce byte-identical output for the same field values.
obs-build delegates to buffa::Message::write_to because its
generated structs implement buffa::Message. Hand-authored structs
under #[derive(Event)] do not — the derive macro therefore emits
per-field calls to BuffaEncodeField, one tag-and-value pair per
field, matching the buffa wire format.
Spec 12 § 1.2 / spec 14 § 5 / decision D6-1 (format_ver bump to 2).
Traits§
- Buffa
Encode Field - Encode a single struct field as a buffa wire-format
tag + valuepair, using proto3’s “skip default” semantics.