Skip to main content

yog_event/client/
net.rs

1//! What the client hears over the network.
2
3use yog_data::Schema;
4use yog_data::with::Raw;
5
6/// A packet the server 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 bytes as the mod wrote them.
12    #[data(with = "Raw")]
13    pub payload: Vec<u8>,
14}