pub trait AsIpAddrs {
// Required method
fn as_ip_addrs(&self) -> Result<HashSet<IpAddr>>;
}Expand description
This trait allows for parsing an input into a set of one or multiple Ipv4Addr.
Required Methods§
fn as_ip_addrs(&self) -> Result<HashSet<IpAddr>>
Implementations on Foreign Types§
source§impl AsIpAddrs for &str
impl AsIpAddrs for &str
Supports one address or multiple addresses separated by ,.
For example: “127.0.0.1,127.0.0.2”.
If the string is empty, will return an empty set.
source§impl AsIpAddrs for ()
impl AsIpAddrs for ()
Optimization for zero sized/empty values, as () will never take up any space or evaluate to
anything, helpful in contexts where we just want an empty value.