Trait protocol::Parcel [] [src]

pub trait Parcel: Sized + PartialEq {
    fn read(read: &mut Read) -> Result<Self, Error>;
fn write(&self, write: &mut Write) -> Result<(), Error>; fn from_raw_bytes(bytes: &[u8]) -> Result<Self, Error> { ... }
fn raw_bytes(&self) -> Result<Vec<u8>, Error> { ... } }

A value which can be read and written.

Required Methods

Reads a value from a stream.

Writes a value to a stream.

Provided Methods

Implementors