Skip to main content

Rule

Trait Rule 

Source
pub trait Rule: 'static {
    const REGEX: LazyCell<Regex>;
    const DEFAULT: &'static str;
    const ATTRIBUTES: &'static [(&'static str, &'static str)] = _;
}

Required Associated Constants§

Source

const REGEX: LazyCell<Regex>

Source

const DEFAULT: &'static str

Provided Associated Constants§

Source

const ATTRIBUTES: &'static [(&'static str, &'static str)] = _

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl Rule for EmailRule

Source§

const REGEX: LazyCell<Regex>

Source§

const DEFAULT: &'static str = "test@example.com"

Source§

const ATTRIBUTES: &'static [(&'static str, &'static str)]

Source§

impl Rule for IbanRule

Source§

const REGEX: LazyCell<Regex>

Source§

const DEFAULT: &'static str = "CH9300762011623852957"

Source§

const ATTRIBUTES: &'static [(&'static str, &'static str)]

Source§

impl Rule for PhoneRule

Source§

const REGEX: LazyCell<Regex>

Source§

const DEFAULT: &'static str = "+41791234567"

Source§

const ATTRIBUTES: &'static [(&'static str, &'static str)]

Source§

impl Rule for PostalCodeCHRule

Source§

const REGEX: LazyCell<Regex>

Source§

const DEFAULT: &'static str = "6210"

Source§

const ATTRIBUTES: &'static [(&'static str, &'static str)]