pub trait WireFormat: Sized + Send {
    // Required methods
    fn byte_size(&self) -> u32;
    fn encode<W: Write>(&self, writer: &mut W) -> Result<()>;
    fn decode<R: Read>(reader: &mut R) -> Result<Self>;
}
Expand description

A type that can be encoded on the wire using the 9P protocol.

Required Methods§

source

fn byte_size(&self) -> u32

Returns the number of bytes necessary to fully encode self.

source

fn encode<W: Write>(&self, writer: &mut W) -> Result<()>

Encodes self into writer.

source

fn decode<R: Read>(reader: &mut R) -> Result<Self>

Decodes Self from reader.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl WireFormat for i32

source§

fn byte_size(&self) -> u32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<()>

source§

fn decode<R: Read>(reader: &mut R) -> Result<Self>

source§

impl WireFormat for u8

source§

fn byte_size(&self) -> u32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<()>

source§

fn decode<R: Read>(reader: &mut R) -> Result<Self>

source§

impl WireFormat for u16

source§

fn byte_size(&self) -> u32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<()>

source§

fn decode<R: Read>(reader: &mut R) -> Result<Self>

source§

impl WireFormat for u32

source§

fn byte_size(&self) -> u32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<()>

source§

fn decode<R: Read>(reader: &mut R) -> Result<Self>

source§

impl WireFormat for u64

source§

fn byte_size(&self) -> u32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<()>

source§

fn decode<R: Read>(reader: &mut R) -> Result<Self>

source§

impl WireFormat for String

source§

fn byte_size(&self) -> u32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<()>

source§

fn decode<R: Read>(reader: &mut R) -> Result<Self>

source§

impl<T> WireFormat for Option<T>
where T: WireFormat,

source§

fn byte_size(&self) -> u32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<()>

source§

fn decode<R: Read>(reader: &mut R) -> Result<Self>

source§

impl<T: WireFormat> WireFormat for Vec<T>

source§

fn byte_size(&self) -> u32

source§

fn encode<W: Write>(&self, writer: &mut W) -> Result<()>

source§

fn decode<R: Read>(reader: &mut R) -> Result<Self>

Implementors§

source§

impl WireFormat for Dirent

source§

impl WireFormat for Qid

source§

impl WireFormat for Rattach

source§

impl WireFormat for Rauth

source§

impl WireFormat for Rerror

source§

impl WireFormat for Rframe

source§

impl WireFormat for Rgetattr

source§

impl WireFormat for Rgetlock

source§

impl WireFormat for Rlcreate

source§

impl WireFormat for Rlerror

source§

impl WireFormat for Rlock

source§

impl WireFormat for Rlopen

source§

impl WireFormat for Rmkdir

source§

impl WireFormat for Rmknod

source§

impl WireFormat for Rread

source§

impl WireFormat for Rreaddir

source§

impl WireFormat for Rstatfs

source§

impl WireFormat for Rversion

source§

impl WireFormat for Rwalk

source§

impl WireFormat for Rwrite

source§

impl WireFormat for Rxattrwalk

source§

impl WireFormat for Tattach

source§

impl WireFormat for Tauth

source§

impl WireFormat for Tclunk

source§

impl WireFormat for Tflush

source§

impl WireFormat for Tframe

source§

impl WireFormat for Tfsync

source§

impl WireFormat for Tgetattr

source§

impl WireFormat for Tgetlock

source§

impl WireFormat for Tlcreate

source§

impl WireFormat for Tlock

source§

impl WireFormat for Tlopen

source§

impl WireFormat for Tmkdir

source§

impl WireFormat for Tmknod

source§

impl WireFormat for Tread

source§

impl WireFormat for Treaddir

source§

impl WireFormat for Tremove

source§

impl WireFormat for Trename

source§

impl WireFormat for Trenameat

source§

impl WireFormat for Tsetattr

source§

impl WireFormat for Tstatfs

source§

impl WireFormat for Tunlinkat

source§

impl WireFormat for Tversion

source§

impl WireFormat for Twalk

source§

impl WireFormat for Twrite

source§

impl WireFormat for Txattrcreate

source§

impl WireFormat for Txattrwalk

source§

impl WireFormat for Data