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.Anywell-known type. - Bool
Rules - BoolRules describes the rules applied to
boolvalues. These rules may also be applied to thegoogle.protobuf.BoolValueWell-Known-Type. - Bytes
Rules - BytesRules describe the rules applied to
bytesvalues. These rules may also be applied to thegoogle.protobuf.BytesValueWell-Known-Type. - Comparable
Rules protocheck - Const
Rule protocheck - Containing
Rules protocheck - Double
Rules - DoubleRules describes the rules applied to
doublevalues. These rules may also be applied to thegoogle.protobuf.DoubleValueWell-Known-Type. - Duration
Rules - DurationRules describe the rules applied exclusively to the
google.protobuf.Durationwell-known type. - Enum
Rules - EnumRules describe the rules applied to
enumvalues. - Field
Path FieldPathprovides a path to a nested protobuf field.- Field
Path Element FieldPathElementprovides 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
fixed32values. - Fixed64
Rules - Fixed64Rules describes the rules applied to
fixed64values. - Float
Rules - FloatRules describes the rules applied to
floatvalues. These rules may also be applied to thegoogle.protobuf.FloatValueWell-Known-Type. - Int32
Rules - Int32Rules describes the rules applied to
int32values. These rules may also be applied to thegoogle.protobuf.Int32ValueWell-Known-Type. - Int64
Rules - Int64Rules describes the rules applied to
int64values. These rules may also be applied to thegoogle.protobuf.Int64ValueWell-Known-Type. - Length
Rules protocheck - MapRules
- MapRules describe the rules applied to
mapvalues. - 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
OneofRulesmessage 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
repeatedvalues. - Rule
Rulerepresents 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
fixed32values. - SFixed64
Rules - SFixed64Rules describes the rules applied to
fixed64values. - SInt32
Rules - SInt32Rules describes the rules applied to
sint32values. - SInt64
Rules - SInt64Rules describes the rules applied to
sint64values. - String
Rules - StringRules describes the rules applied to
stringvalues These rules may also be applied to thegoogle.protobuf.StringValueWell-Known-Type. - Substring
Rule protocheck - Substring
Rules protocheck - Timestamp
Comparable Rules protocheck - Timestamp
Rules - TimestampRules describe the rules applied exclusively to the
google.protobuf.Timestampwell-known type. - UInt32
Rules - UInt32Rules describes the rules applied to
uint32values. These rules may also be applied to thegoogle.protobuf.UInt32ValueWell-Known-Type. - UInt64
Rules - UInt64Rules describes the rules applied to
uint64values. These rules may also be applied to thegoogle.protobuf.UInt64ValueWell-Known-Type. - Violation
Violationrepresents 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
Violationsis a collection ofViolationmessages. This message type is returned by Protovalidate when a proto message fails to meet the requirements set by theRulevalidation rules. Each individual violation is represented by aViolationmessage.
Enums§
- Comparable
Greater Than protocheck - Comparable
Less Than protocheck - Ignore
- Specifies how
FieldRules.ignorebehaves, 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