Skip to main contentModule validators
Source pub use any::*;pub use bool::*;pub use bytes::*;pub use duration::*;pub use enums::*;pub use map::*;pub use message::*;pub use repeated::*;pub use string::*;pub use timestamp::*;pub use floats::*;pub use integers::*;pub use field_mask::*;
- any
- bool
- bytes
- duration
- enums
- field_mask
- floats
- integers
- map
- message
- repeated
- string
- timestamp
- CelProgram
- A struct that holds the data to initialize and execute a CEL program. It can be created from a
CelRule. - CelRule
- A rule that defines CEL-based validation
- FailFast
- Unit struct to signal the
fail fast setting and trigger early returns with ValidationResult. - FieldContext
- The context for the field being validated.
- FnValidator
- Implements
Validator for the wrapped function, similarly to FromFn. - IntoIter
- Owned iterator for
ViolationCtx. - Iter
- Ref iterator for
ViolationCtx. - IterMut
- Mutable ref iterator for
ViolationCtx. - OneofValidator
- OneofValidatorBuilder
- Builder for
OneofValidator. - SortedList
- Holds a static list of immutable, sorted values.
- ValidationCtx
- The context for a given validation execution.
- ValidationErrors
- Holds the rich context concerning the validation errors that occur during validation.
- ViolationCtx
- The context of a specific violation.
- ViolationCtxMut
- Mutable view for
ViolationCtx. - ViolationCtxRef
- Immutable view for
ViolationCtx. - ViolationMeta
- Offers information about the subject of the violation: the violation kind (string, int32, bytes, etc) and the field kind (map key, map value, etc).
- CelError
cel - Represents runtime errors that can occur with CEL programs.
- FieldKind
- Specifies whether the target of the validation is a field/element as a whole,
a value or key in a map field, or an item in a repeated field.
- IsValid
- A boolean-like enum that represents validation status. It supports all of the bit operators.
- CelOneof
cel - A trait that enables conversion into
cel::Value. - CelValue
cel - A trait that enables conversion into
cel::Value. - IntoSortedList
- Utility trait to convert a sortable list into a
SortedList. - ProtoValidation
- Trait implemented by targets of proto validators.
- ValidationResultExt
- Utility sealed trait for
ValidationResult that makes it easier to discern the validation status. - Validator
- The trait implemented by the validators, which can be structs or functions used with
FnValidator. - ValidatorBuilderFor
- Utility trait for validator builders. Mainly used for default validators.
- from_fn
- Creates a validator from a function, using
FnValidator.
- ValidationResult
- Alias for
Result<IsValid, FailFast>.