yog-event 0.8.0

Yog event system — pub/sub for game/server events.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! What the client hears over the network.

use yog_data::Schema;
use yog_data::with::Raw;

/// A packet the server sent on a mod's channel; keyed by the channel.
#[derive(Debug, Clone, Schema)]
pub struct Packet {
    /// The channel (`mymod:sync`).
    pub channel: String,
    /// The bytes as the mod wrote them.
    #[data(with = "Raw")]
    pub payload: Vec<u8>,
}