BufExt

Trait BufExt 

Source
pub trait BufExt {
    // Required methods
    fn get<T: Codec>(&mut self) -> Result<T>;
    fn get_var(&mut self) -> Result<u64>;
}
Expand description

Extension trait for reading from buffers

Required Methods§

Source

fn get<T: Codec>(&mut self) -> Result<T>

Read and decode a value from the buffer

Source

fn get_var(&mut self) -> Result<u64>

Read a variable-length integer from the buffer

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.

Implementors§

Source§

impl<T: Buf> BufExt for T