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
//! Generated Rust types for the [`buf.validate`](https://github.com/bufbuild/protovalidate)
//! protobuf schema, built with `prost` (and optionally `prost-reflect`).
//!
//! This crate provides:
//!
//! - All message and enum types from `buf/validate/validate.proto`
//! (e.g. [`FieldRules`], [`MessageRules`], [`OneofRules`]).
//! - [`rules_meta`] — rule ids and violation-message templates shared by the
//! runtime evaluator and the build-time code generator.
//!
//! With the **`reflect`** feature (default), it additionally provides:
//!
//! - A shared [`DESCRIPTOR_POOL`] containing the file descriptor set for
//! runtime reflection.
//! - Extension traits for extracting constraint annotations from descriptors:
//! - [`FieldConstraintsExt`] — `buf.validate.field` rules on a
//! `FieldDescriptor`.
//! - [`MessageConstraintsExt`] — `buf.validate.message` rules on a
//! `MessageDescriptor`.
//! - [`OneofConstraintsExt`] — `buf.validate.oneof` rules on a
//! `OneofDescriptor`.
//! - [`PredefinedConstraintsExt`] — `buf.validate.predefined` rules.
//! - [`FieldConstraintsDynExt`] / [`MessageConstraintsDynExt`] — raw
//! `DynamicMessage` access for the runtime validator.
//! - Typed helper functions for extension extraction with concrete error types:
//! [`field_constraints_typed`], [`message_constraints_typed`],
//! [`oneof_constraints_typed`], [`predefined_constraints_typed`].
//!
//! Disabling `reflect` yields a slim, reflection-free build — the generated
//! prost types plus [`rules_meta`] — for consumers that only run build-time
//! generated validators.
//!
//! # Usage
//!
//! Most users do not need this crate directly — the
//! [`prost-protovalidate`](https://crates.io/crates/prost-protovalidate) crate re-exports
//! everything required for validation via its `types` module. Use this crate when you only need the
//! generated types or descriptor pool without the evaluation engine.
pub use *;
pub use *;
/// Error returned while decoding `buf.validate` descriptor extensions.
/// Typed decode result for descriptor extension constraints.
pub type ConstraintDecodeResult<T> = ;