ToIpv4Address

Trait ToIpv4Address 

Source
pub trait ToIpv4Address {
    // Required method
    fn ipv4(&self) -> Result<Ipv4Addr>;
}
Expand description

Trait for converting various types into an IPv4 address.

Required Methods§

Source

fn ipv4(&self) -> Result<Ipv4Addr>

Attempts to convert the implementing type into an Ipv4Addr. Returns the IPv4 address on success or an error on failure.

Implementations on Foreign Types§

Source§

impl ToIpv4Address for &str

Source§

impl ToIpv4Address for IpAddr

Source§

impl ToIpv4Address for String

Source§

impl ToIpv4Address for Ipv4Addr

Implementors§