Trait validator::ValidateIp

source ·
pub trait ValidateIp {
    // Required methods
    fn validate_ipv4(&self) -> bool;
    fn validate_ipv6(&self) -> bool;
    fn validate_ip(&self) -> bool;
}

Required Methods§

source

fn validate_ipv4(&self) -> bool

Validates whether the given string is an IP V4

source

fn validate_ipv6(&self) -> bool

Validates whether the given string is an IP V6

source

fn validate_ip(&self) -> bool

Validates whether the given string is an IP

Implementors§

source§

impl<T> ValidateIp for T
where T: ToString,