mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-26 05:38:20 -06:00
19 lines
306 B
Rust
19 lines
306 B
Rust
use bincode::{Encode, Decode};
|
|
|
|
#[repr(u8)]
|
|
#[derive(Encode, Decode)]
|
|
pub enum ClientPacket<T> where T: Encode + Decode {
|
|
Data(T),
|
|
Connect,
|
|
Disconnect,
|
|
Heartbeat,
|
|
}
|
|
|
|
#[repr(u8)]
|
|
#[derive(Encode, Decode)]
|
|
pub enum ServerPacket<T> where T: Encode + Decode {
|
|
Data(T),
|
|
Connected,
|
|
Disconnected,
|
|
}
|