Struct lrs::socket::SockAddr

A socket address.

Syntax

struct SockAddr {
    /* private fields */
}

Static methods

NameDescription
from_bytes

Creates a socket address from a sequence of bytes.

from_bytes_unchecked

Creates a socket address from a sequence of bytes without validation.

from_mut_bytes

Creates a mutable socket address from a sequence of bytes.

from_mut_bytes_unchecked

Creates a mutable socket address from a sequence of bytes without validation.

Methods

ReceiverNameDescription
&selfaddr_type

Returns the address type of the socket address.

&selfas_ipv4

Returns the socket address as an Ipv4 socket address.

&selfas_ipv6

Returns the socket address as an Ipv6 socket address.

&mut selfas_mut_ipv4

Returns the socket address as a mutable Ipv4 socket address.

&mut selfas_mut_ipv6

Returns the socket address as a mutable Ipv6 socket address.

&mut selfas_mut_unix

Returns the socket address as a mutable Unix socket address.

&selfas_unix

Returns the socket address as a Unix socket address.

Trait implementations

NameDescription
Debug

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