lightyear_netcode 0.25.5

Connection handling for the lightyear networking library
Documentation
1
2
3
4
5
6
7
8
9
use lightyear_serde::reader::ReadInteger;
use lightyear_serde::writer::WriteInteger;

pub trait Bytes: Sized {
    const SIZE: usize = core::mem::size_of::<Self>();
    type Error;
    fn write_to(&self, writer: &mut impl WriteInteger) -> Result<(), Self::Error>;
    fn read_from(reader: &mut impl ReadInteger) -> Result<Self, Self::Error>;
}