Struct lrs::socket::ip::Ipv4SockAddr

An Ipv4 socket address.

Syntax

struct Ipv4SockAddr {
    /* private fields */
}

Static methods

NameDescription
from_addr_port

Creates a new Ipv4 socket address from an address and a port.

from_bytes

Creates an Ipv4 socket address from given bytes.

from_bytes_unchecked

Creates an Ipv4 socket address from given bytes without validation.

from_mut_bytes

Creates a mutable Ipv4 socket address from given bytes.

from_mut_bytes_unchecked

Creates a mutable Ipv4 socket address from given bytes without validation.

Methods

ReceiverNameDescription
&selfaddr

Returns the Ipv4 address of the socket address.

&selfport

Returns the port of the socket address.

&mut selfset_addr

Sets the Ipv4 address of the socket address.

&mut selfset_port

Sets the port of the socket address.

Trait implementations

NameDescription
Debug

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