Struct netsim::Ipv6Range [] [src]

pub struct Ipv6Range { /* fields omitted */ }

A range of IPv6 addresses with a common prefix

Methods

impl Ipv6Range
[src]

[src]

Create a range with the given base IP address and netmask prefix length.

Example

Create the subnet 2000::/12 with Ipv6Range::new(ipv6!("2000::"), 12)

[src]

Return the entire IPv6 range, ::/0

[src]

Get the netmask as an IPv6 address

[src]

Get the number of netmask prefix bits

[src]

Get the base address of the range, ie. the lowest IP address which is part of the range.

[src]

Check whether this range contains the given IP address

Important traits for Vec<u8>
[src]

Split a range into num sub-ranges

Panics

If the range is too small to be split up that much.

[src]

Get a random IP address from the range which is not the base address or the default for the gateway address.

[src]

Get a default IP address for the range's next hop. This is one higher than the base address of the range. eg. for 2000::/x the default address for the next hop will be 2000::1

Trait Implementations

impl Clone for Ipv6Range
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Ipv6Range
[src]

impl Debug for Ipv6Range
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Ipv6Range

impl Sync for Ipv6Range