Struct barc::BarcReader

source ·
pub struct BarcReader { /* private fields */ }
Expand description

BARC file handle for read access. Each reader has its own file handle and position.

Implementations

Read and return the next Record or None if EOF. The provided Tunables max_body_ram controls, depending on record sizes and compression, whether the request and response bodies are read directly into RAM, buffered in a file, or deferred via a ReadSlice.

Returns the current offset in bytes of this reader, which starts as 0 and is advanced by each succesful return from read or updated via seek.

Seek to a known byte offset (e.g. 0 or as returned from BarcWriter::write or offset) from the start of the BARC file. This effects subsequent calls to read, which may error if the position is not to a valid record head.

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.