[][src]Struct mohan::ser::BinReader

pub struct BinReader<'a> { /* fields omitted */ }

Utility to read from a binary source

Methods

impl<'a> BinReader<'a>[src]

pub fn new(source: &'a mut dyn Read, version: ProtocolVersion) -> BinReader<'a>[src]

Constructor for a new BinReader for the provided source and protocol version.

Trait Implementations

impl<'a> Reader for BinReader<'a>[src]

Utility wrapper for an underlying byte Reader. Defines higher level methods to read numbers, byte vectors, hashes, etc.

fn read_bytes_len_prefix(&mut self) -> Result<Vec<u8>, Error>[src]

Read a variable size vector from the underlying Read. Expects a usize

fn read_fixed_bytes(&mut self, len: usize) -> Result<Vec<u8>, Error>[src]

Read a fixed number of bytes.

Auto Trait Implementations

impl<'a> !Send for BinReader<'a>

impl<'a> !Sync for BinReader<'a>

impl<'a> Unpin for BinReader<'a>

impl<'a> !UnwindSafe for BinReader<'a>

impl<'a> !RefUnwindSafe for BinReader<'a>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,