Skip to main content

Validator

Trait Validator 

Source
pub trait Validator<T: ?Sized> {
    // Required method
    fn validate(&self, value: &T, ctx: &mut dyn VisitorContext);
}
Expand description

Allows a node to validate values.

Required Methods§

Source

fn validate(&self, value: &T, ctx: &mut dyn VisitorContext)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Validator<Decimal> for MaxDecimalPlaces

Source§

impl Validator<[u8]> for Utf8

Source§

impl Validator<str> for AlphaUscore

Source§

impl Validator<str> for AlphanumUscore

Source§

impl Validator<str> for Ascii

Source§

impl Validator<str> for Camel

Source§

impl Validator<str> for E164PhoneNumber

Source§

impl Validator<str> for Iso639_1

Source§

impl Validator<str> for Iso3166_1A2

Source§

impl Validator<str> for Kebab

Source§

impl Validator<str> for Lower

Source§

impl Validator<str> for LowerUscore

Source§

impl Validator<str> for MimeType

Source§

impl Validator<str> for RgbHex

Source§

impl Validator<str> for RgbaHex

Source§

impl Validator<str> for Sentence

Source§

impl Validator<str> for Sha256

Source§

impl Validator<str> for Snake

Source§

impl Validator<str> for Title

Source§

impl Validator<str> for Upper

Source§

impl Validator<str> for UpperCamel

Source§

impl Validator<str> for UpperKebab

Source§

impl Validator<str> for UpperSnake

Source§

impl Validator<str> for Url

Source§

impl<N: NumericValue> Validator<N> for icydb_model::base::validator::num::Equal

Source§

impl<N: NumericValue> Validator<N> for Gt

Source§

impl<N: NumericValue> Validator<N> for Gte

Source§

impl<N: NumericValue> Validator<N> for Lt

Source§

impl<N: NumericValue> Validator<N> for Lte

Source§

impl<N: NumericValue> Validator<N> for MultipleOf

Source§

impl<N: NumericValue> Validator<N> for NotEqual

Source§

impl<N: NumericValue> Validator<N> for icydb_model::base::validator::num::Range

Source§

impl<T: HasLen + ?Sized> Validator<T> for icydb_model::base::validator::len::Equal

Source§

impl<T: HasLen + ?Sized> Validator<T> for Max

Source§

impl<T: HasLen + ?Sized> Validator<T> for Min

Source§

impl<T: HasLen + ?Sized> Validator<T> for icydb_model::base::validator::len::Range

Source§

impl<T> Validator<T> for InArray<T>
where T: PartialEq,