1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//!A fully asynchronous Rust client library for interacting with the
//.
//!
//!# The library
//!
//!`rust-schema-registry-client` provides a Schema Registry client, along with serdes (serializers/deserializers) for
//!Avro, Protobuf, and JSON Schema.
//!
//!
//!## Features
//!
//!- Support for Avro, Protobuf, and JSON Schema formats
//!- Data quality rules using Google Common Expression Language (CEL) expressions
//!- Schema migration rules using JSONata expressions
//!- Client-side field-level encryption (CSFLE) rules using AWS KMS, Azure Key Vault, Google Cloud KMS, or HashiCorp Vault
//!
//!This library can be used with [rust-rdkafka](https://github.com/fede1024/rust-rdkafka) but does not depend on it.
//!
//!## Serdes
//!
//!- [`AvroSerializer`] and [`AvroDeserializer`] - serdes that use `apache-avro`
//!- [`ProtobufSerializer`] and [`ProtobufDeserializer`] - serdes that use `prost` and `prost-reflect`
//!- [`JsonSerializer`] and [`JsonDeserializer`] - serdes that use `jsonschema`
//!
//!# Installation
//!
//!Add this to your `Cargo.toml`:
//!
//!```toml
//![dependencies]
//!schema-registry-client = { version = "0.4.2" }
//!```
//!
//!The following features are available:
//!
//!- `rules-cel` - enables data quality rules using CEL
//!- `rules-encryption-awskms` - enables CSFLE rules using AWS KMS
//!- `rules-encryption-azurekms` - enables CSFLE rules using Azure Key Vault
//!- `rules-encryption-gcpkms` - enables CSFLE rules using Google Cloud KMS
//!- `rules-encryption-hcvault` - enables CSFLE rules using HashiCorp Vault
//!- `rules-encryption-localkms` - enables CSFLE rules using a local KMS (for testing)
//!- `rules-jsonata` - enables schema migration rules using JSONata
//!
//!For example, to use CSFLE with the AWS KMS, add this to your `Cargo.toml`:
//!
//!```toml
//!
//![dependencies]
//!schema-registry-client = { version = "0.4.1", features = ["rules-encryption-awskms"] }
//!```
//!
//!# Examples
//!
//!You can find examples in the [`examples`] folder. To run them:
//!
//!```bash
//!cargo run --example <example_name> -- <example_args>
//!```
//!
//!Further information can be found in this [blog](https://yokota.blog/2025/04/16/using-data-contracts-with-the-rust-schema-registry-client/).
//!
//![`AvroSerializer`]: https://docs.rs/schema-registry-client/*/schema_registry_client/serdes/avro/struct.AvroSerializer.html
//![`AvroDeserializer`]: https://docs.rs/schema-registry-client/*/schema_registry_client/serdes/avro/struct.AvroDeserializer.html
//![`ProtobufSerializer`]: https://docs.rs/schema-registry-client/*/schema_registry_client/serdes/protobuf/struct.ProtobufSerializer.html
//![`ProtobufDeserializer`]: https://docs.rs/schema-registry-client/*/schema_registry_client/serdes/protobuf/struct.ProtobufDeserializer.html
//![`JsonSerializer`]: https://docs.rs/schema-registry-client/*/schema_registry_client/serdes/json/struct.JsonSerializer.html
//![`JsonDeserializer`]: https://docs.rs/schema-registry-client/*/schema_registry_client/serdes/json/struct.JsonDeserializer.html
//![`examples`]: https://github.com/rayokota/rust-schema-registry-client/blob/master/examples/
use DescriptorPool;
use LazyLock;
static FILE_DESCRIPTOR_SET: & = include_bytes!;
static DESCRIPTOR_POOL: = new;
static TEST_FILE_DESCRIPTOR_SET: & = include_bytes!;
static TEST_DESCRIPTOR_POOL: = new;