Struct zstd_safe::InBuffer

source ·
pub struct InBuffer<'a> {
    pub src: &'a [u8],
    pub pos: usize,
}
Expand description

Wrapper around an input buffer.

Bytes will be read starting at src[pos].

pos will be updated after reading.

Fields§

§src: &'a [u8]§pos: usize

Implementations§

Returns a new InBuffer around the given slice.

Starts with pos = 0.

Returns the current cursor position.

Sets the new cursor position.

Panics

If pos > self.src.len().

Trait Implementations§

Formats the value using the given formatter. Read more

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.