pub struct ReadBuf<'a> { /* private fields */ }
Expand description

A local memory slice to read from memory

Implementations

Create a readbuf from a slice

Check if everything has been properly consumed

Check if we reach the end of the buffer

Skip a number of bytes from the buffer.

Return a slice of the next bytes from the buffer

Return a sub-buffer ending at the given byte offset

Peek at the next u8 from the buffer. the cursor is not advanced to the next byte.

Return the next u8 from the buffer

Return the next u16 from the buffer

Return the next u32 from the buffer

Return the next u64 from the buffer

Return the next u128 from the buffer

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.