pub enum NetworkType {
    Unspecified,
    Udp4,
    Udp6,
    Tcp4,
    Tcp6,
}
Expand description

Represents the type of network.

Variants

Unspecified

Udp4

Indicates UDP over IPv4.

Udp6

Indicates UDP over IPv6.

Tcp4

Indicates TCP over IPv4.

Tcp6

Indicates TCP over IPv6.

Implementations

Returns true when network is UDP4 or UDP6.

Returns true when network is TCP4 or TCP6.

Returns the short network description.

Returns true if the network is reliable.

Returns whether the network type is IPv4 or not.

Returns whether the network type is IPv6 or not.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.