Struct lrs::socket::ip::Ipv6Addr

An Ipv6 address.

Syntax

struct Ipv6Addr(u16, u16, u16, u16, u16, u16, u16, u16)

Fields

PositionDescription
1
2
3
4
5
6
7
8

Static methods

NameDescription
dhcp_server_multicast

Creates the well-known "All DHCP servers" multicast address.

from_be_bytes

Creates an Ipv6 address from segments in network byte order.

from_bytes

Creates an Ipv6 address from segments in host byte order.

loopback

Creates the loopback address ::1.

multicast

Creates the well-known "All nodes" multicast address with a certain scope.

ntp_multicast

Creates the well-known "All NTP servers" multicast address with a certain scope.

router_multicast

Creates the well-known "All routers" multicast address with a certain scope.

unspecified

Creates the unspecified address ::.

Methods

ReceiverNameDescription
&selfis_6to4

Compares the address to the 6to4 prefix 2002::/16.

&selfis_bmwg

Compares the address to the BWMG prefix 2001:2::/48.

&selfis_discard

Compares the address to the discard prefix 0100::/64.

&selfis_documentation

Compares the address to the documentation prefix 2001:db8::/32.

&selfis_ipv4_compatible

Compares the address to the prefix ::/96.

&selfis_ipv4_mapped

Compares the address to the Ipv4-mapped prefix ::ffff:0:0/96.

&selfis_ipv4_translated

Compares the address to the Ipv4-translated prefix ::ffff:0:0:0/96.

&selfis_link_local

Compares the address to the link local prefix fe80::/10.

&selfis_multicast

Compares the address to the multicast prefix ff00::/8.

&selfis_orchidv2

Compares the address to the ORCHIDv2 prefix 2001:20::/28.

&selfis_teredo

Compares the address to the Teredo prefix 2001::/32.

&selfis_unique_local

Compares the address to the unique local prefix fc00::/7.

&selfto_be_bytes

Transforms the address into an array of segments in network byte order.

&selfto_bytes

Transforms the address into an array of segments in host byte order.

Trait implementations

NameDescription
Clone

Objects that can be duplicated.

Copy

Objects that can safely be copied via memcpy.

Debug

Objects that can be formatted in a "debug" form.

Eq

Objects that implement the binary == and != operators.

MaybeClone

Objects that can be duplicated.

Pod

Objects that are safe to use if they contain a random bit pattern.

Remarks

The individual segments should be stored in host byte order. That is, ::1 is stored as

Ipv6Addr(0, 0, 0, 0, 0, 0, 0, 1)