pub trait Version:
Copy
+ Send
+ Sync
+ 'static {
type HandshakingServerbound: PacketSet;
type StatusClientbound: PacketSet;
type StatusServerbound: PacketSet;
type LoginClientbound: PacketSet;
type LoginServerbound: PacketSet;
type PlayClientbound: PacketSet;
type PlayServerbound: PacketSet;
const PROTOCOL: i32;
const NAME: &'static str;
const POSITION_LAYOUT: PositionLayout;
}Expand description
A protocol version: its number and the packet sets of every state and direction.
Implemented by the generated marker types (e.g. crate::v1_8::V1_8). A
version-agnostic layer can be written generically over V: Version and map each
version’s packet enums into common events.
Required Associated Constants§
Sourceconst POSITION_LAYOUT: PositionLayout
const POSITION_LAYOUT: PositionLayout
Bit layout of packed block positions.
Required Associated Types§
Sourcetype HandshakingServerbound: PacketSet
type HandshakingServerbound: PacketSet
Serverbound handshaking packets.
Sourcetype StatusClientbound: PacketSet
type StatusClientbound: PacketSet
Clientbound status packets.
Sourcetype StatusServerbound: PacketSet
type StatusServerbound: PacketSet
Serverbound status packets.
Sourcetype LoginClientbound: PacketSet
type LoginClientbound: PacketSet
Clientbound login packets.
Sourcetype LoginServerbound: PacketSet
type LoginServerbound: PacketSet
Serverbound login packets.
Sourcetype PlayClientbound: PacketSet
type PlayClientbound: PacketSet
Clientbound play packets.
Sourcetype PlayServerbound: PacketSet
type PlayServerbound: PacketSet
Serverbound play packets.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".