Skip to main content

IpAddrExt

Trait IpAddrExt 

Source
pub trait IpAddrExt {
    // Required methods
    fn subnet(&self, mask: &SubnetMask) -> Subnet;
    fn is_global(&self) -> bool;
}
Expand description

Extension trait providing subnet helpers for IpAddr.

Required Methods§

Source

fn subnet(&self, mask: &SubnetMask) -> Subnet

Return the Subnet for the given SubnetMask.

Source

fn is_global(&self) -> bool

Determine if this IP address is globally routable.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IpAddrExt for IpAddr

Source§

fn subnet(&self, mask: &SubnetMask) -> Subnet

Source§

fn is_global(&self) -> bool

Implementors§