pub fn address(&self) -> Result<IpNetwork, Error> {
        if let Some(ip) = self.ifa_local {
            Ok(IpNetwork::new(ip, self.prefix_len())?)
        } else if let Some(ip) = self.ifa_address {
            Ok(IpNetwork::new(ip, self.prefix_len())?)
        } else {
            bail!("IP address not present")
        }
    }
/// Get the local interface address (the main address) as IpNetwork
/// which is the ifa_local address (if specified) or ifa_address otherwise
Get the local interface address (the main address) as IpNetwork
which is the ifa_local address (if specified) or ifa_address otherwise
Get the local interface address ( the main address ) as IpNetwork which is the ifa_local address ( if specified ) or ifa_address otherwise
pub fn address(&self) -> Result<IpNetwork, Error> {
        if let Some(ip) = self.ifa_local {
            Ok(IpNetwork::new(ip, self.prefix_len())?)
        } else if let Some(ip) = self.ifa_address {
            Ok(IpNetwork::new(ip, self.prefix_len())?)
        } else {
            bail!("IP address not present")
        }
    }
pub fn address ( & self ) -> Result < IpNetwork , Error > { if let Some ( ip ) = self . ifa_local { Ok ( IpNetwork :: new ( ip , self . prefix_len ( ) ) ? ) } else if let Some ( ip ) = self . ifa_address { Ok ( IpNetwork :: new ( ip , self . prefix_len ( ) ) ? ) } else { bail ! ( " " ) } }
Get the local interface address (the main address) as IpNetwork
which is the ifa_local address (if specified) or ifa_address otherwise
Get the local interface address ( the main address ) as IpNetwork which is the ifa_local address ( if specified ) or ifa_address otherwise
&self
&self