Skip to main content

Module differential_table

Module differential_table 

Source
Expand description

Emit a Rust source file that provides:

  • CASES: &[Case] — a static table of (message, api_key, version, kind) cases
  • default_json_for(name) — JSON the oracle should accept for default fixture
  • encode_default(name, version) — Rust-encoded bytes from Default::default()
  • TAGGED_CASES, encode_tagged_fixture(name, version) and tagged_fixture_json_for(name, version) — the same sweep over every message that has a tagged field, with each tagged field set

crates/protocol/tests/differential_all.rs consumes the file with include!.

This module emits with proc_macro2 and quote! instead of writeln!. See emit::api_key_enum_quote for the overall pattern.

Functions§

emit
Errors