Struct blaze_pk::Packet

source ·
pub struct Packet<C: Codec>(pub PacketHeader, pub C);
Expand description

Structure for a packet created by ourselves where the data contents are already known and not encoded

Tuple Fields

0: PacketHeader1: C

Implementations

Converts this packet into an opaque packet

Reads a packet from the provided input and parses the contents

Reads a packet from the provided input and parses the contents

Handles writing the header and contents of this packet to the Writable object

Trait Implementations

Formats the value using the given formatter. Read more
The type returned in the event of a conversion error.
Performs the conversion.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.