Skip to main content

VarIntWritable

Trait VarIntWritable 

Source
pub trait VarIntWritable: Copy + PartialOrd {
    // Required methods
    fn is_zero(self) -> bool;
    fn low_7_bits(self) -> u8;
    fn shr_7(&mut self);
}
Expand description

Trait for writing VarInts Allows generic VarInt writing for unsigned integer types.

Required Methods§

Source

fn is_zero(self) -> bool

Returns whether the value is zero.

Source

fn low_7_bits(self) -> u8

Returns the lower 7 bits as a byte.

Source

fn shr_7(&mut self)

Shifts the value right by 7 bits (in-place).

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 VarIntWritable for u8

Source§

fn is_zero(self) -> bool

Source§

fn low_7_bits(self) -> u8

Source§

fn shr_7(&mut self)

Source§

impl VarIntWritable for u16

Source§

fn is_zero(self) -> bool

Source§

fn low_7_bits(self) -> u8

Source§

fn shr_7(&mut self)

Source§

impl VarIntWritable for u32

Source§

fn is_zero(self) -> bool

Source§

fn low_7_bits(self) -> u8

Source§

fn shr_7(&mut self)

Source§

impl VarIntWritable for u64

Source§

fn is_zero(self) -> bool

Source§

fn low_7_bits(self) -> u8

Source§

fn shr_7(&mut self)

Source§

impl VarIntWritable for u128

Source§

fn is_zero(self) -> bool

Source§

fn low_7_bits(self) -> u8

Source§

fn shr_7(&mut self)

Source§

impl VarIntWritable for usize

Source§

fn is_zero(self) -> bool

Source§

fn low_7_bits(self) -> u8

Source§

fn shr_7(&mut self)

Implementors§