Trait roadblk::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>

Object Safety§

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§