[][src]Enum naia_shared::PacketType

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

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

Variants

Data

A packet containing Event/Entity 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

impl Clone for PacketType[src]

impl Copy for PacketType[src]

impl Debug for PacketType[src]

impl From<u8> for PacketType[src]

impl PartialEq<PacketType> for PacketType[src]

impl StructuralPartialEq for PacketType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,