Trait mdns_sd::AsIpAddrs

source ·
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§

Implementations on Foreign Types§

source§

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 IpAddr

source§

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.

source§

impl AsIpAddrs for String

source§

impl<I: AsIpAddrs> AsIpAddrs for &[I]

Support slice. Example: &[“127.0.0.1”, “127.0.0.2”]

source§

impl<T: AsIpAddrs> AsIpAddrs for &T

Implementors§