Struct lrs::socket::ip::Ipv4Addr

An Ipv4 address.

Syntax

struct Ipv4Addr(u8, u8, u8, u8)

Fields

PositionDescription
1
2
3
4

Static methods

NameDescription
any

Creates the unspecified address 0.0.0.0.

broadcast

Creates the broadcast address 255.255.255.255.

from_be

Creates a new Ipv4 address from a 32 bit integer in network byte order.

from_bytes

Creates a new Ipv4 address from given bytes.

Methods

ReceiverNameDescription
selfis_6to4

Compares the address to the 6to4 prefix 192.88.99.0/24.

selfis_current

Compares the address to the current prefix 0.0.0.0/8.

selfis_link_local

Compares the address to the link-local prefix 169.254.0.0/16.

selfis_loopback

Compares the address to the loopback prefix 127.0.0.0/8.

selfis_multicast

Compares the address to the multicast prefix 224.0.0.0/4.

selfis_private

Compares the address to the privat prefixes.

selfis_shared

Compares the address to the shared prefix 100.64.0.0/10.

selfto_be

Turns the address into a 32 bit integer in network byte order.

selfto_bytes

Turns the address into an array of bytes.

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.