SomeOrStringWrapper

Trait SomeOrStringWrapper 

Source
pub trait SomeOrStringWrapper {
Show 15 methods // Required methods fn required(&self) -> bool; fn accepted(&self) -> bool; fn email(&self) -> bool; fn url(&self) -> bool; fn phone(&self) -> bool; fn non_control_character(&self) -> bool; fn ip(&self) -> bool; fn ip_v4(&self) -> bool; fn ip_v6(&self) -> bool; fn credit_card(&self) -> bool; fn rule_contains(&self, needle: String) -> bool; fn in<B: ToString>(&self, haystack: Vec<B>) -> bool; fn length_min(&self, min: usize) -> bool; fn length_max(&self, max: usize) -> bool; fn length_eq(&self, eq: usize) -> bool;
}

Required Methods§

Source

fn required(&self) -> bool

Source

fn accepted(&self) -> bool

Source

fn email(&self) -> bool

Source

fn url(&self) -> bool

Source

fn phone(&self) -> bool

Source

fn non_control_character(&self) -> bool

Source

fn ip(&self) -> bool

Source

fn ip_v4(&self) -> bool

Source

fn ip_v6(&self) -> bool

Source

fn credit_card(&self) -> bool

Source

fn rule_contains(&self, needle: String) -> bool

Source

fn in<B: ToString>(&self, haystack: Vec<B>) -> bool

Source

fn length_min(&self, min: usize) -> bool

Source

fn length_max(&self, max: usize) -> bool

Source

fn length_eq(&self, eq: usize) -> bool

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 SomeOrStringWrapper for &bool

Source§

fn required(&self) -> bool

Source§

fn accepted(&self) -> bool

Source§

fn email(&self) -> bool

Source§

fn url(&self) -> bool

Source§

fn phone(&self) -> bool

Source§

fn non_control_character(&self) -> bool

Source§

fn ip(&self) -> bool

Source§

fn ip_v4(&self) -> bool

Source§

fn ip_v6(&self) -> bool

Source§

fn credit_card(&self) -> bool

Source§

fn rule_contains(&self, _needle: String) -> bool

Source§

fn in<B>(&self, _haystack: Vec<B>) -> bool
where B: ToString,

Source§

fn length_min(&self, _min: usize) -> bool

Source§

fn length_max(&self, _max: usize) -> bool

Source§

fn length_eq(&self, _eq: usize) -> bool

Source§

impl SomeOrStringWrapper for &String

Source§

fn required(&self) -> bool

Source§

fn accepted(&self) -> bool

Source§

fn email(&self) -> bool

Source§

fn url(&self) -> bool

Source§

fn phone(&self) -> bool

Source§

fn non_control_character(&self) -> bool

Source§

fn ip(&self) -> bool

Source§

fn ip_v4(&self) -> bool

Source§

fn ip_v6(&self) -> bool

Source§

fn credit_card(&self) -> bool

Source§

fn rule_contains(&self, needle: String) -> bool

Source§

fn in<B>(&self, haystack: Vec<B>) -> bool
where B: ToString,

Source§

fn length_min(&self, min: usize) -> bool

Source§

fn length_max(&self, max: usize) -> bool

Source§

fn length_eq(&self, eq: usize) -> bool

Source§

impl<A> SomeOrStringWrapper for &Option<A>
where A: ToString + Clone,

Source§

fn required(&self) -> bool

Source§

fn accepted(&self) -> bool

Source§

fn email(&self) -> bool

Source§

fn url(&self) -> bool

Source§

fn phone(&self) -> bool

Source§

fn non_control_character(&self) -> bool

Source§

fn ip(&self) -> bool

Source§

fn ip_v4(&self) -> bool

Source§

fn ip_v6(&self) -> bool

Source§

fn credit_card(&self) -> bool

Source§

fn rule_contains(&self, needle: String) -> bool

Source§

fn in<B>(&self, haystack: Vec<B>) -> bool
where B: ToString,

Source§

fn length_min(&self, min: usize) -> bool

Source§

fn length_max(&self, max: usize) -> bool

Source§

fn length_eq(&self, eq: usize) -> bool

Implementors§