pub trait ReadSigmaVlqExt: Read {
    // Provided methods
    fn get_i8(&mut self) -> Result<i8, Error> { ... }
    fn get_u8(&mut self) -> Result<u8, Error> { ... }
    fn get_i16(&mut self) -> Result<i16, VlqEncodingError> { ... }
    fn get_u16(&mut self) -> Result<u16, VlqEncodingError> { ... }
    fn get_i32(&mut self) -> Result<i32, VlqEncodingError> { ... }
    fn get_u32(&mut self) -> Result<u32, VlqEncodingError> { ... }
    fn get_i64(&mut self) -> Result<i64, VlqEncodingError> { ... }
    fn get_u64(&mut self) -> Result<u64, VlqEncodingError> { ... }
    fn get_bits(&mut self, size: usize) -> Result<Vec<bool>, VlqEncodingError> { ... }
    fn get_short_string(&mut self) -> Result<String, VlqEncodingError> { ... }
    fn get_option<T>(
        &mut self,
        get_value: &dyn Fn(&mut Self) -> Result<T, VlqEncodingError>
    ) -> Option<T> { ... }
}
Expand description

Read and decode values using VLQ (+ ZigZag for signed values) encoded and written with WriteSigmaVlqExt for VLQ see https://en.wikipedia.org/wiki/Variable-length_quantity (GLE) for ZigZag see https://developers.google.com/protocol-buffers/docs/encoding#types

Provided Methods§

source

fn get_i8(&mut self) -> Result<i8, Error>

Read i8 without decoding

source

fn get_u8(&mut self) -> Result<u8, Error>

Read u8 without decoding

source

fn get_i16(&mut self) -> Result<i16, VlqEncodingError>

Read and decode using VLQ and ZigZag value written with WriteSigmaVlqExt::put_i16

source

fn get_u16(&mut self) -> Result<u16, VlqEncodingError>

Read and decode using VLQ value written with WriteSigmaVlqExt::put_u16

source

fn get_i32(&mut self) -> Result<i32, VlqEncodingError>

Read and decode using VLQ and ZigZag value written with WriteSigmaVlqExt::put_i32

source

fn get_u32(&mut self) -> Result<u32, VlqEncodingError>

Read and decode using VLQ value written with WriteSigmaVlqExt::put_u32

source

fn get_i64(&mut self) -> Result<i64, VlqEncodingError>

Read and decode using VLQ and ZigZag value written with WriteSigmaVlqExt::put_i64

source

fn get_u64(&mut self) -> Result<u64, VlqEncodingError>

Read and decode using VLQ value written with WriteSigmaVlqExt::put_u64

source

fn get_bits(&mut self, size: usize) -> Result<Vec<bool>, VlqEncodingError>

Read a vector of bits with the given size

source

fn get_short_string(&mut self) -> Result<String, VlqEncodingError>

Reads a string from the reader. Reads a byte (size), and the string

source

fn get_option<T>( &mut self, get_value: &dyn Fn(&mut Self) -> Result<T, VlqEncodingError> ) -> Option<T>

Read and decode an optional value using supplied function

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<R: Read + ?Sized> ReadSigmaVlqExt for R

Mark all types implementing Read as implementing the extension.