pub struct BuffReader<'a> {
    pub position: usize,
    /* private fields */
}
Expand description

Buff reader is reading corresponding types from buffer (Byte array) and stores current position (later as cursor)

Fields§

§position: usize

Implementations§

Variable byte integer can be 1-4 Bytes long. Buffer reader takes all 4 Bytes at first and than check what is true length of varbyteint and increment cursor by that

Reading u32 from buffer as Big endian

Reading u16 from buffer as Big endinan

Reading one byte from buffer as Big endian

Reading UTF-8 encoded string from buffer

Read Binary data from buffer

Read string pair from buffer

Read payload message from buffer

Peeking (without incremental internal pointer) one byte from buffer as Big endian

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.