vlq_rust

Trait Vlq

Source
pub trait Vlq: Sized {
    // Required methods
    fn from_reader<R: Read>(reader: &mut R) -> Result<Self>;
    fn to_writer<W: Write>(self, writer: &mut W) -> Result<()>;
}
Expand description

Trait applied to all types that can be encoded as VLQ’s.

Required Methods§

Source

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

Read a variable-length quantity from a reader.

Source

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

Write this variable-length quantity to a writer.

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§

Source§

impl Vlq for i8

Source§

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

Source§

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

Source§

impl Vlq for i16

Source§

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

Source§

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

Source§

impl Vlq for i32

Source§

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

Source§

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

Source§

impl Vlq for i64

Source§

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

Source§

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

Source§

impl Vlq for i128

Source§

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

Source§

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

Source§

impl Vlq for isize

Source§

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

Source§

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

Source§

impl Vlq for u8

Source§

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

Source§

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

Source§

impl Vlq for u16

Source§

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

Source§

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

Source§

impl Vlq for u32

Source§

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

Source§

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

Source§

impl Vlq for u64

Source§

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

Source§

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

Source§

impl Vlq for u128

Source§

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

Source§

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

Source§

impl Vlq for usize

Source§

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

Source§

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

Implementors§