Trait 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,