pub fn last(&self) -> IpAddr {
        match self.broadcast() {
            IpAddr::V4(ip) => {
                let mut bytes = ip.octets();
                let idx = bytes.len() - 1;
                bytes[idx] -= 1;
                Ipv4Addr::from(bytes).into()
            }
            IpAddr::V6(ip) => {
                let mut bytes = ip.octets();
                let idx = bytes.len() - 1;
                bytes[idx] -= 1;
                Ipv6Addr::from(bytes).into()
            }
        }
    }
/// Return the last non-broadcast IP address which falls within this
/// network.
Return the last non-broadcast IP address which falls within this
network.
Return the last non - broadcast IP address which falls within this network .
pub fn last(&self) -> IpAddr {
        match self.broadcast() {
            IpAddr::V4(ip) => {
                let mut bytes = ip.octets();
                let idx = bytes.len() - 1;
                bytes[idx] -= 1;
                Ipv4Addr::from(bytes).into()
            }
            IpAddr::V6(ip) => {
                let mut bytes = ip.octets();
                let idx = bytes.len() - 1;
                bytes[idx] -= 1;
                Ipv6Addr::from(bytes).into()
            }
        }
    }
pub fn last ( & self ) -> IpAddr { match self . broadcast ( ) { IpAddr :: V4 ( ip ) => { let mut bytes = ip . octets ( ) ; let idx = bytes . len ( ) - 1 ; bytes [ idx ] -= 1 ; Ipv4Addr :: from ( bytes ) . into ( ) } IpAddr :: V6 ( ip ) => { let mut bytes = ip . octets ( ) ; let idx = bytes . len ( ) - 1 ; bytes [ idx ] -= 1 ; Ipv6Addr :: from ( bytes ) . into ( ) } } }
Return the last non-broadcast IP address which falls within this
network.
Return the last non - broadcast IP address which falls within this network .
&self
&self