1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Convenient re-exports for everyday use of `mc_protocol`.
//!
//! Importing the prelude brings the most commonly used types, traits, and the
//! derive macro into scope with a single `use` statement, avoiding repetitive
//! per-module imports in protocol implementation crates.
//!
//! # Usage
//!
//! ```rust
//! use mc_protocol::prelude::*;
//! ```
//!
//! This gives you:
//!
//! - [`Serialize`] and [`Deserialize`] traits for encoding/decoding protocol fields
//! - [`SerializationError`] for serialization error handling
//! - [`VarInt`] and [`VarLong`] — variable-length integer types used throughout the protocol
//! - [`RawPacket`] and [`UncompressedPacket`] for packet framing
//! - [`PacketId`] trait and [`PacketError`] for packet I/O
//! - `#[derive(Packet)]` macro for automatic struct serialization
//!
//! Feature-gated items are re-exported only when the relevant feature is enabled.
//! Enable `compression` to get the zlib helpers, and `encryption` for the
//! AES-128-CFB8 types.
// --- Core serialization ---
pub use crate;
// --- Variable-length integers ---
pub use crate;
// --- Packet framing ---
pub use crate;
// --- Derive macro ---
pub use Packet;
// --- Compression helpers (requires `compression` feature) ---
pub use crate;
// --- Sync encryption (requires `encryption` feature) ---
pub use crate;
// --- Async encryption (requires `async` + `encryption` features) ---
pub use crate;