Available on crate feature
protovalidate
only.Expand description
Generated rust code from buf.validate protobuf package, with some added methods and structs.
Modules§
- bytes_
rules - Nested message and enum types in
BytesRules
. - double_
rules - Nested message and enum types in
DoubleRules
. - duration_
rules - Nested message and enum types in
DurationRules
. - field_
path_ element - Nested message and enum types in
FieldPathElement
. - field_
rules - Nested message and enum types in
FieldRules
. - fixed32_
rules - Nested message and enum types in
Fixed32Rules
. - fixed64_
rules - Nested message and enum types in
Fixed64Rules
. - float_
rules - Nested message and enum types in
FloatRules
. - int32_
rules - Nested message and enum types in
Int32Rules
. - int64_
rules - Nested message and enum types in
Int64Rules
. - s_
fixed32_ rules - Nested message and enum types in
SFixed32Rules
. - s_
fixed64_ rules - Nested message and enum types in
SFixed64Rules
. - s_
int32_ rules - Nested message and enum types in
SInt32Rules
. - s_
int64_ rules - Nested message and enum types in
SInt64Rules
. - string_
rules - Nested message and enum types in
StringRules
. - timestamp_
rules - Nested message and enum types in
TimestampRules
. - u_
int32_ rules - Nested message and enum types in
UInt32Rules
. - u_
int64_ rules - Nested message and enum types in
UInt64Rules
.
Structs§
- AnyRules
- AnyRules describe rules applied exclusively to the
google.protobuf.Any
well-known type. - Bool
Rules - BoolRules describes the rules applied to
bool
values. These rules may also be applied to thegoogle.protobuf.BoolValue
Well-Known-Type. - Bytes
Rules - BytesRules describe the rules applied to
bytes
values. These rules may also be applied to thegoogle.protobuf.BytesValue
Well-Known-Type. - Comparable
Rules protocheck
- Const
Rule protocheck
- Containing
Rules protocheck
- Double
Rules - DoubleRules describes the rules applied to
double
values. These rules may also be applied to thegoogle.protobuf.DoubleValue
Well-Known-Type. - Duration
Rules - DurationRules describe the rules applied exclusively to the
google.protobuf.Duration
well-known type. - Enum
Rules - EnumRules describe the rules applied to
enum
values. - Field
Path FieldPath
provides a path to a nested protobuf field.- Field
Path Element FieldPathElement
provides enough information to nest through a single protobuf field.- Field
Rules - FieldRules encapsulates the rules for each type of field. Depending on the field, the correct set should be used to ensure proper validations.
- Fixed32
Rules - Fixed32Rules describes the rules applied to
fixed32
values. - Fixed64
Rules - Fixed64Rules describes the rules applied to
fixed64
values. - Float
Rules - FloatRules describes the rules applied to
float
values. These rules may also be applied to thegoogle.protobuf.FloatValue
Well-Known-Type. - Int32
Rules - Int32Rules describes the rules applied to
int32
values. These rules may also be applied to thegoogle.protobuf.Int32Value
Well-Known-Type. - Int64
Rules - Int64Rules describes the rules applied to
int64
values. These rules may also be applied to thegoogle.protobuf.Int64Value
Well-Known-Type. - Length
Rules protocheck
- MapRules
- MapRules describe the rules applied to
map
values. - Message
Oneof Rule - Message
Rules - MessageRules represents validation rules that are applied to the entire message. It includes disabling options and a list of Rule messages representing Common Expression Language (CEL) validation rules.
- Oneof
Rules - The
OneofRules
message type enables you to manage rules for oneof fields in your protobuf messages. - Predefined
Rules - PredefinedRules are custom rules that can be re-used with multiple fields.
- Repeated
Rules - RepeatedRules describe the rules applied to
repeated
values. - Rule
Rule
represents a validation rule written in the Common Expression Language (CEL) syntax. Each Rule includes a unique identifier, an optional error message, and the CEL expression to evaluate. For more information, see our documentation.- SFixed32
Rules - SFixed32Rules describes the rules applied to
fixed32
values. - SFixed64
Rules - SFixed64Rules describes the rules applied to
fixed64
values. - SInt32
Rules - SInt32Rules describes the rules applied to
sint32
values. - SInt64
Rules - SInt64Rules describes the rules applied to
sint64
values. - String
Rules - StringRules describes the rules applied to
string
values These rules may also be applied to thegoogle.protobuf.StringValue
Well-Known-Type. - Substring
Rule protocheck
- Substring
Rules protocheck
- Timestamp
Comparable Rules protocheck
- Timestamp
Rules - TimestampRules describe the rules applied exclusively to the
google.protobuf.Timestamp
well-known type. - UInt32
Rules - UInt32Rules describes the rules applied to
uint32
values. These rules may also be applied to thegoogle.protobuf.UInt32Value
Well-Known-Type. - UInt64
Rules - UInt64Rules describes the rules applied to
uint64
values. These rules may also be applied to thegoogle.protobuf.UInt64Value
Well-Known-Type. - Violation
Violation
represents a single instance where a validation rule, expressed as aRule
, was not met. It provides information about the field that caused the violation, the specific rule that wasn’t fulfilled, and a human-readable error message.- Violations
Violations
is a collection ofViolation
messages. This message type is returned by Protovalidate when a proto message fails to meet the requirements set by theRule
validation rules. Each individual violation is represented by aViolation
message.
Enums§
- Comparable
Greater Than protocheck
- Comparable
Less Than protocheck
- Ignore
- Specifies how
FieldRules.ignore
behaves, depending on the field’s value, and whether the field tracks presence. - Item
List protocheck
- Known
Regex - KnownRegex contains some well-known patterns.
- Length
Rules Kind protocheck
- Length
Rules Target protocheck
Traits§
- Numeric
Rules protocheck