Available on crate feature
protovalidate only.Expand description
Generated rust code from buf.validate protobuf package, with some added methods and structs.
Modules§
- any_
violations - base_
violations - bytes_
rules - Nested message and enum types in
BytesRules. - bytes_
violations - double_
rules - Nested message and enum types in
DoubleRules. - duration_
rules - Nested message and enum types in
DurationRules. - duration_
violations - enum_
violations - field_
mask_ violations - 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. - float_
violations - int32_
rules - Nested message and enum types in
Int32Rules. - int64_
rules - Nested message and enum types in
Int64Rules. - int_
violations - map_
violations - oneof_
violations - repeated_
violations - 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. - string_
violations - timestamp_
rules - Nested message and enum types in
TimestampRules. - timestamp_
violations - u_
int32_ rules - Nested message and enum types in
UInt32Rules. - u_
int64_ rules - Nested message and enum types in
UInt64Rules. - violations_
data
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. - Const
Path Element - Struct that can map to a
FieldPathElementwith const-compatible values. - 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
Mask Rules - FieldMaskRules describe rules applied exclusively to the
google.protobuf.FieldMaskwell-known type. - 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. - 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. - 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.- Violation
Data - The name and path elements associated with a given violation.
- 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§
- AnyViolation
- All types of violations for
anyfields. - Bool
Violation - All types of violations for
boolfields. - Bytes
Violation - All types of violations for
bytesfields. - Double
Violation - All types of violations for
doublefields. - Duration
Violation - All types of violations for
durationfields. - Enum
Violation - All types of violations for
enumfields. - Field
Mask Violation - All types of violations for
field_maskfields. - Fixed32
Violation - All types of violations for
fixed32fields. - Fixed64
Violation - All types of violations for
fixed64fields. - Float
Violation - All types of violations for
floatfields. - Ignore
- Specifies how
FieldRules.ignorebehaves, depending on the field’s value, and whether the field tracks presence. - Int32
Violation - All types of violations for
int32fields. - Int64
Violation - All types of violations for
int64fields. - Known
Regex - KnownRegex contains some well-known patterns.
- MapViolation
- All types of violations for
mapfields. - Repeated
Violation - All types of violations for
repeatedfields. - Sfixed32
Violation - All types of violations for
sfixed32fields. - Sfixed64
Violation - All types of violations for
sfixed64fields. - Sint32
Violation - All types of violations for
sint32fields. - Sint64
Violation - All types of violations for
sint64fields. - String
Violation - All types of violations for
stringfields. - Timestamp
Violation - All types of violations for
timestampfields. - Uint32
Violation - All types of violations for
uint32fields. - Uint64
Violation - All types of violations for
uint64fields. - Violation
Kind - All types of violation from protovalidate rules.
Constants§
- ANY_
IN_ VIOLATION - The data for the
any.inviolation. - ANY_
NOT_ IN_ VIOLATION - The data for the
any.not_inviolation. - BOOL_
CONST_ VIOLATION - The data for the
bool.constviolation. - BYTES_
CONST_ VIOLATION - The data for the
bytes.constviolation. - BYTES_
CONTAINS_ VIOLATION - The data for the
bytes.containsviolation. - BYTES_
IN_ VIOLATION - The data for the
bytes.inviolation. - BYTES_
IPV4_ VIOLATION - The data for the
bytes.ipv4violation. - BYTES_
IPV6_ VIOLATION - The data for the
bytes.ipv6violation. - BYTES_
IP_ VIOLATION - The data for the
bytes.ipviolation. - BYTES_
LEN_ VIOLATION - The data for the
bytes.lenviolation. - BYTES_
MAX_ LEN_ VIOLATION - The data for the
bytes.max_lenviolation. - BYTES_
MIN_ LEN_ VIOLATION - The data for the
bytes.min_lenviolation. - BYTES_
NOT_ IN_ VIOLATION - The data for the
bytes.not_inviolation. - BYTES_
PATTERN_ VIOLATION - The data for the
bytes.patternviolation. - BYTES_
PREFIX_ VIOLATION - The data for the
bytes.prefixviolation. - BYTES_
SUFFIX_ VIOLATION - The data for the
bytes.suffixviolation. - BYTES_
UUID_ VIOLATION - The data for the
bytes.uuidviolation. - CEL_
VIOLATION - Data for the
celviolation. - DOUBLE_
CONST_ VIOLATION - The data for the
double.constviolation. - DOUBLE_
FINITE_ VIOLATION - The data for the
double.finiteviolation. - DOUBLE_
GTE_ VIOLATION - The data for the
double.gteviolation. - DOUBLE_
GT_ VIOLATION - The data for the
double.gtviolation. - DOUBLE_
IN_ VIOLATION - The data for the
double.inviolation. - DOUBLE_
LTE_ VIOLATION - The data for the
double.lteviolation. - DOUBLE_
LT_ VIOLATION - The data for the
double.ltviolation. - DOUBLE_
NOT_ IN_ VIOLATION - The data for the
double.not_inviolation. - DURATION_
CONST_ VIOLATION - The data for the
duration.constviolation. - DURATION_
GTE_ VIOLATION - The data for the
duration.gteviolation. - DURATION_
GT_ VIOLATION - The data for the
duration.gtviolation. - DURATION_
IN_ VIOLATION - The data for the
duration.inviolation. - DURATION_
LTE_ VIOLATION - The data for the
duration.lteviolation. - DURATION_
LT_ VIOLATION - The data for the
duration.ltviolation. - DURATION_
NOT_ IN_ VIOLATION - The data for the
duration.not_inviolation. - ENUM_
CONST_ VIOLATION - The data for the
enum.constviolation. - ENUM_
DEFINED_ ONLY_ VIOLATION - The data for the
enum.defined_onlyviolation. - ENUM_
IN_ VIOLATION - The data for the
enum.inviolation. - ENUM_
NOT_ IN_ VIOLATION - The data for the
enum.not_inviolation. - FIELD_
MASK_ CONST_ VIOLATION - The data for the
field_mask.constviolation. - FIELD_
MASK_ IN_ VIOLATION - The data for the
field_mask.inviolation. - FIELD_
MASK_ NOT_ IN_ VIOLATION - The data for the
field_mask.not_inviolation. - FIXE
D32_ CONST_ VIOLATION - The data for the
fixed32.constviolation. - FIXE
D32_ GTE_ VIOLATION - The data for the
fixed32.gteviolation. - FIXE
D32_ GT_ VIOLATION - The data for the
fixed32.gtviolation. - FIXE
D32_ IN_ VIOLATION - The data for the
fixed32.inviolation. - FIXE
D32_ LTE_ VIOLATION - The data for the
fixed32.lteviolation. - FIXE
D32_ LT_ VIOLATION - The data for the
fixed32.ltviolation. - FIXE
D32_ NOT_ IN_ VIOLATION - The data for the
fixed32.not_inviolation. - FIXE
D64_ CONST_ VIOLATION - The data for the
fixed64.constviolation. - FIXE
D64_ GTE_ VIOLATION - The data for the
fixed64.gteviolation. - FIXE
D64_ GT_ VIOLATION - The data for the
fixed64.gtviolation. - FIXE
D64_ IN_ VIOLATION - The data for the
fixed64.inviolation. - FIXE
D64_ LTE_ VIOLATION - The data for the
fixed64.lteviolation. - FIXE
D64_ LT_ VIOLATION - The data for the
fixed64.ltviolation. - FIXE
D64_ NOT_ IN_ VIOLATION - The data for the
fixed64.not_inviolation. - FLOAT_
CONST_ VIOLATION - The data for the
float.constviolation. - FLOAT_
FINITE_ VIOLATION - The data for the
float.finiteviolation. - FLOAT_
GTE_ VIOLATION - The data for the
float.gteviolation. - FLOAT_
GT_ VIOLATION - The data for the
float.gtviolation. - FLOAT_
IN_ VIOLATION - The data for the
float.inviolation. - FLOAT_
LTE_ VIOLATION - The data for the
float.lteviolation. - FLOAT_
LT_ VIOLATION - The data for the
float.ltviolation. - FLOAT_
NOT_ IN_ VIOLATION - The data for the
float.not_inviolation. - INT32_
CONST_ VIOLATION - The data for the
int32.constviolation. - INT32_
GTE_ VIOLATION - The data for the
int32.gteviolation. - INT32_
GT_ VIOLATION - The data for the
int32.gtviolation. - INT32_
IN_ VIOLATION - The data for the
int32.inviolation. - INT32_
LTE_ VIOLATION - The data for the
int32.lteviolation. - INT32_
LT_ VIOLATION - The data for the
int32.ltviolation. - INT32_
NOT_ IN_ VIOLATION - The data for the
int32.not_inviolation. - INT64_
CONST_ VIOLATION - The data for the
int64.constviolation. - INT64_
GTE_ VIOLATION - The data for the
int64.gteviolation. - INT64_
GT_ VIOLATION - The data for the
int64.gtviolation. - INT64_
IN_ VIOLATION - The data for the
int64.inviolation. - INT64_
LTE_ VIOLATION - The data for the
int64.lteviolation. - INT64_
LT_ VIOLATION - The data for the
int64.ltviolation. - INT64_
NOT_ IN_ VIOLATION - The data for the
int64.not_inviolation. - MAP_
KEYS_ VIOLATION - The data for the
map.keysviolation. - MAP_
MAX_ PAIRS_ VIOLATION - The data for the
map.max_pairsviolation. - MAP_
MIN_ PAIRS_ VIOLATION - The data for the
map.min_pairsviolation. - MAP_
VALUES_ VIOLATION - The data for the
map.valuesviolation. - ONEOF_
REQUIRED_ VIOLATION - Data for the oneof
requiredviolation. - REPEATED_
ITEMS_ VIOLATION - The data for the
repeated.itemsviolation. - REPEATED_
MAX_ ITEMS_ VIOLATION - The data for the
repeated.max_itemsviolation. - REPEATED_
MIN_ ITEMS_ VIOLATION - The data for the
repeated.min_itemsviolation. - REPEATED_
UNIQUE_ VIOLATION - The data for the
repeated.uniqueviolation. - REQUIRED_
VIOLATION - Data for the
requiredviolation. - SFIXE
D32_ CONST_ VIOLATION - The data for the
sfixed32.constviolation. - SFIXE
D32_ GTE_ VIOLATION - The data for the
sfixed32.gteviolation. - SFIXE
D32_ GT_ VIOLATION - The data for the
sfixed32.gtviolation. - SFIXE
D32_ IN_ VIOLATION - The data for the
sfixed32.inviolation. - SFIXE
D32_ LTE_ VIOLATION - The data for the
sfixed32.lteviolation. - SFIXE
D32_ LT_ VIOLATION - The data for the
sfixed32.ltviolation. - SFIXE
D32_ NOT_ IN_ VIOLATION - The data for the
sfixed32.not_inviolation. - SFIXE
D64_ CONST_ VIOLATION - The data for the
sfixed64.constviolation. - SFIXE
D64_ GTE_ VIOLATION - The data for the
sfixed64.gteviolation. - SFIXE
D64_ GT_ VIOLATION - The data for the
sfixed64.gtviolation. - SFIXE
D64_ IN_ VIOLATION - The data for the
sfixed64.inviolation. - SFIXE
D64_ LTE_ VIOLATION - The data for the
sfixed64.lteviolation. - SFIXE
D64_ LT_ VIOLATION - The data for the
sfixed64.ltviolation. - SFIXE
D64_ NOT_ IN_ VIOLATION - The data for the
sfixed64.not_inviolation. - SINT32_
CONST_ VIOLATION - The data for the
sint32.constviolation. - SINT32_
GTE_ VIOLATION - The data for the
sint32.gteviolation. - SINT32_
GT_ VIOLATION - The data for the
sint32.gtviolation. - SINT32_
IN_ VIOLATION - The data for the
sint32.inviolation. - SINT32_
LTE_ VIOLATION - The data for the
sint32.lteviolation. - SINT32_
LT_ VIOLATION - The data for the
sint32.ltviolation. - SINT32_
NOT_ IN_ VIOLATION - The data for the
sint32.not_inviolation. - SINT64_
CONST_ VIOLATION - The data for the
sint64.constviolation. - SINT64_
GTE_ VIOLATION - The data for the
sint64.gteviolation. - SINT64_
GT_ VIOLATION - The data for the
sint64.gtviolation. - SINT64_
IN_ VIOLATION - The data for the
sint64.inviolation. - SINT64_
LTE_ VIOLATION - The data for the
sint64.lteviolation. - SINT64_
LT_ VIOLATION - The data for the
sint64.ltviolation. - SINT64_
NOT_ IN_ VIOLATION - The data for the
sint64.not_inviolation. - STRING_
ADDRESS_ VIOLATION - The data for the
string.addressviolation. - STRING_
CONST_ VIOLATION - The data for the
string.constviolation. - STRING_
CONTAINS_ VIOLATION - The data for the
string.containsviolation. - STRING_
EMAIL_ VIOLATION - The data for the
string.emailviolation. - STRING_
HOSTNAME_ VIOLATION - The data for the
string.hostnameviolation. - STRING_
HOST_ AND_ PORT_ VIOLATION - The data for the
string.host_and_portviolation. - STRING_
IN_ VIOLATION - The data for the
string.inviolation. - STRING_
IPV4_ PREFIX_ VIOLATION - The data for the
string.ipv4_prefixviolation. - STRING_
IPV4_ VIOLATION - The data for the
string.ipv4violation. - STRING_
IPV4_ WITH_ PREFIXLEN_ VIOLATION - The data for the
string.ipv4_with_prefixlenviolation. - STRING_
IPV6_ PREFIX_ VIOLATION - The data for the
string.ipv6_prefixviolation. - STRING_
IPV6_ VIOLATION - The data for the
string.ipv6violation. - STRING_
IPV6_ WITH_ PREFIXLEN_ VIOLATION - The data for the
string.ipv6_with_prefixlenviolation. - STRING_
IP_ PREFIX_ VIOLATION - The data for the
string.ip_prefixviolation. - STRING_
IP_ VIOLATION - The data for the
string.ipviolation. - STRING_
IP_ WITH_ PREFIXLEN_ VIOLATION - The data for the
string.ip_with_prefixlenviolation. - STRING_
LEN_ BYTES_ VIOLATION - The data for the
string.len_bytesviolation. - STRING_
LEN_ VIOLATION - The data for the
string.lenviolation. - STRING_
MAX_ BYTES_ VIOLATION - The data for the
string.max_bytesviolation. - STRING_
MAX_ LEN_ VIOLATION - The data for the
string.max_lenviolation. - STRING_
MIN_ BYTES_ VIOLATION - The data for the
string.min_bytesviolation. - STRING_
MIN_ LEN_ VIOLATION - The data for the
string.min_lenviolation. - STRING_
NOT_ CONTAINS_ VIOLATION - The data for the
string.not_containsviolation. - STRING_
NOT_ IN_ VIOLATION - The data for the
string.not_inviolation. - STRING_
PATTERN_ VIOLATION - The data for the
string.patternviolation. - STRING_
PREFIX_ VIOLATION - The data for the
string.prefixviolation. - STRING_
SUFFIX_ VIOLATION - The data for the
string.suffixviolation. - STRING_
TUUID_ VIOLATION - The data for the
string.tuuidviolation. - STRING_
ULID_ VIOLATION - The data for the
string.ulidviolation. - STRING_
URI_ REF_ VIOLATION - The data for the
string.uri_refviolation. - STRING_
URI_ VIOLATION - The data for the
string.uriviolation. - STRING_
UUID_ VIOLATION - The data for the
string.uuidviolation. - STRING_
WELL_ KNOWN_ REGEX_ VIOLATION - The data for the
string.well_known_regexviolation. - TIMESTAMP_
CONST_ VIOLATION - The data for the
timestamp.constviolation. - TIMESTAMP_
GTE_ VIOLATION - The data for the
timestamp.gteviolation. - TIMESTAMP_
GT_ NOW_ VIOLATION - The data for the
timestamp.gt_nowviolation. - TIMESTAMP_
GT_ VIOLATION - The data for the
timestamp.gtviolation. - TIMESTAMP_
LTE_ VIOLATION - The data for the
timestamp.lteviolation. - TIMESTAMP_
LT_ NOW_ VIOLATION - The data for the
timestamp.lt_nowviolation. - TIMESTAMP_
LT_ VIOLATION - The data for the
timestamp.ltviolation. - TIMESTAMP_
WITHIN_ VIOLATION - The data for the
timestamp.withinviolation. - UINT32_
CONST_ VIOLATION - The data for the
uint32.constviolation. - UINT32_
GTE_ VIOLATION - The data for the
uint32.gteviolation. - UINT32_
GT_ VIOLATION - The data for the
uint32.gtviolation. - UINT32_
IN_ VIOLATION - The data for the
uint32.inviolation. - UINT32_
LTE_ VIOLATION - The data for the
uint32.lteviolation. - UINT32_
LT_ VIOLATION - The data for the
uint32.ltviolation. - UINT32_
NOT_ IN_ VIOLATION - The data for the
uint32.not_inviolation. - UINT64_
CONST_ VIOLATION - The data for the
uint64.constviolation. - UINT64_
GTE_ VIOLATION - The data for the
uint64.gteviolation. - UINT64_
GT_ VIOLATION - The data for the
uint64.gtviolation. - UINT64_
IN_ VIOLATION - The data for the
uint64.inviolation. - UINT64_
LTE_ VIOLATION - The data for the
uint64.lteviolation. - UINT64_
LT_ VIOLATION - The data for the
uint64.ltviolation. - UINT64_
NOT_ IN_ VIOLATION - The data for the
uint64.not_inviolation.