[][src]Struct barc::BarcReader

pub struct BarcReader { /* fields omitted */ }

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

Implementations

impl BarcReader[src]

pub fn read(&mut self, tune: &Tunables) -> Result<Option<Record>, BarcError>[src]

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.

pub fn offset(&self) -> u64[src]

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.

pub fn seek(&mut self, offset: u64) -> Result<(), BarcError>[src]

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

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

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

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

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

impl<T, U> Into<U> for T where
    U: From<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<V, T> VZip<V> for T where
    V: MultiLane<T>,