[][src]Trait naia_shared::PropertyIo

pub trait PropertyIo<T> {
    fn write(&self, buffer: &mut Vec<u8>);
fn read(&mut self, cursor: &mut Cursor<&[u8]>); }

A Property that can read/write itself from/into incoming/outgoing packets

Required methods

fn write(&self, buffer: &mut Vec<u8>)

Writes contained value into outgoing byte stream

fn read(&mut self, cursor: &mut Cursor<&[u8]>)

Given a cursor into incoming packet data, updates the Property with the synced value

Loading content...

Implementors

impl<T: Clone + DeBin + SerBin> PropertyIo<T> for Property<T>[src]

Loading content...