Trait RegexValidator

Source
pub trait RegexValidator<V> {
    // Required method
    fn validate(regex: &Lazy<Regex>, value: &V) -> Result<(), RegexError>;
}

Required Methods§

Source

fn validate(regex: &Lazy<Regex>, value: &V) -> Result<(), RegexError>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl RegexValidator<Option<String>> for Option<String>

Source§

fn validate( regex: &Lazy<Regex>, value: &Option<String>, ) -> Result<(), RegexError>

Source§

impl RegexValidator<String> for String

Source§

fn validate(regex: &Lazy<Regex>, value: &String) -> Result<(), RegexError>

Implementors§