Crate minecrevy_io

Crate minecrevy_io 

Source
Expand description

A library for encoding/decoding Minecraft packets and data types in the style of serde.

§Example

use minecrevy_io::{McRead, McWrite};

#[derive(McRead, McWrite)]
pub struct Handshake {
    #[args(varint = true)]
    pub version: i32,
    #[args(max_len = 255)]
    pub address: String,
    pub port: u16,
    #[args(varint = true)]
    pub next: i32,
}

Modules§

args
Configurable arguments for customizing how encode and decode operations work for data types.
ext
Extension traits for the builtin Read and Write traits.
packet
An untyped, raw Minecraft packet.
prelude
Re-exports important traits, types, and functions.
util
Utility functions for the minecrevy_io crate.

Traits§

McRead
A trait for reading a type from a stream of bytes.
McWrite
A trait for writing a type to a stream of bytes.