yog_event/server/net.rs
1//! What the server hears over the network.
2
3use yog_data::Schema;
4use yog_data::with::Raw;
5
6/// A packet a client sent on a mod's channel; keyed by the channel.
7#[derive(Debug, Clone, Schema)]
8pub struct Packet {
9 /// The channel (`mymod:sync`).
10 pub channel: String,
11 /// The sender's name.
12 pub player: String,
13 /// The bytes as the mod wrote them.
14 #[data(with = "Raw")]
15 pub payload: Vec<u8>,
16}