Enum naia_shared::PacketType[][src]

#[repr(u8)]
pub enum PacketType {
    Data,
    Heartbeat,
    ClientChallengeRequest,
    ServerChallengeResponse,
    ClientConnectRequest,
    ServerConnectResponse,
    Ping,
    Pong,
    Unknown,
}
Expand description

An enum representing the different types of packets that can be sent/received

Variants

Data

A packet containing Message/Entity/Component data

Heartbeat

A packet sent to maintain the connection by preventing a timeout

ClientChallengeRequest

An initial handshake message sent by the Client to the Server

ServerChallengeResponse

The Server’s response to the Client’s initial handshake message

ClientConnectRequest

The final handshake message sent by the Client

ServerConnectResponse

The final handshake message sent by the Server, indicating that the connection has been established

Ping

A Ping message, used to calculate RTT. Must be responded to with a Pong message

Pong

A Pong message, used to calculate RTT. Must be the response to all Ping messages

Unknown

An unknown packet type

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

Performs the conversion.

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.

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)

recently added

Uses borrowed data to replace owned data, usually by cloning. 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.