Development Documentation (main branch) - For stable release docs, see docs.rs/eidetica

VarInt

Trait VarInt 

pub trait VarInt: Sized + Copy {
    // Required methods
    fn write<W>(&self, w: &mut W)
       where W: Write;
    fn read<R>(r: &mut R) -> Result<Self, Error>
       where R: Read;
}

Required Methods§

fn write<W>(&self, w: &mut W)
where W: Write,

fn read<R>(r: &mut R) -> Result<Self, Error>
where R: Read,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl VarInt for i8

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<i8, Error>
where R: Read,

§

impl VarInt for i16

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<i16, Error>
where R: Read,

§

impl VarInt for i32

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<i32, Error>
where R: Read,

§

impl VarInt for i64

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<i64, Error>
where R: Read,

§

impl VarInt for isize

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<isize, Error>
where R: Read,

§

impl VarInt for u8

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<u8, Error>
where R: Read,

§

impl VarInt for u16

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<u16, Error>
where R: Read,

§

impl VarInt for u32

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<u32, Error>
where R: Read,

§

impl VarInt for u64

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<u64, Error>
where R: Read,

§

impl VarInt for u128

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<u128, Error>
where R: Read,

§

impl VarInt for usize

§

fn write<W>(&self, w: &mut W)
where W: Write,

§

fn read<R>(r: &mut R) -> Result<usize, Error>
where R: Read,

Implementors§