Struct netaddr::net::ipv6::IpNetworkExperimental [-]  [+] [src]

pub struct IpNetwork(pub IpAddr, pub usize);

Methods

impl IpNetwork

fn version(&self) -> IpAddrVersion

Get the corresponding IP address version.

fn address(&self) -> IpAddr

Get the network address for the network.

fn broadcast_address(&self) -> IpAddr

Get the broadcast address for the network.

fn prefix(&self) -> usize

Get the length of the network prefix, in bits.

fn host_prefix(&self) -> usize

Get the length of the host prefix, in bits.

fn num_addresses(&self) -> usize

The total number of addresses in the network.

fn mask(&self) -> IpAddr

Get the mask of the network.

fn range(&self) -> (IpAddr, IpAddr)

Get the hosts range this network have.

fn contains(&self, ip: IpAddr) -> bool

true if this ip is contained in the network.

fn overlaps(&self, other: IpNetwork) -> bool

true if this network is partly or wholly contained in other or other is wholly contained in this network.

fn iter(&self) -> Hosts

Iterate over all addresses of this network.

fn hosts_iter(&self) -> Hosts

Iterate over all usable hosts of this network.

Trait Implementations

impl PartialOrd for IpNetwork

fn partial_cmp(&self, other: &IpNetwork) -> Option<Ordering>

fn lt(&self, other: &Rhs) -> bool

fn le(&self, other: &Rhs) -> bool

fn gt(&self, other: &Rhs) -> bool

fn ge(&self, other: &Rhs) -> bool

impl Ord for IpNetwork

fn cmp(&self, other: &IpNetwork) -> Ordering

impl String for IpNetwork

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl Decodable for IpNetwork

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<IpNetwork, Error>

impl Encodable for IpNetwork

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), Error>

impl<__S: Writer + Hasher> Hash<__S> for IpNetwork

fn hash(&self, __arg_0: &mut __S)

impl Eq for IpNetwork

fn assert_receiver_is_total_eq(&self)

impl PartialEq for IpNetwork

fn eq(&self, __arg_0: &IpNetwork) -> bool

fn ne(&self, __arg_0: &IpNetwork) -> bool

impl Show for IpNetwork

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for IpNetwork

fn clone(&self) -> IpNetwork

fn clone_from(&mut self, source: &Self)

impl Copy for IpNetwork