[−][src]Struct barc::BarcReader
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
impl RefUnwindSafe for BarcReader
[src]
impl Send for BarcReader
[src]
impl Sync for BarcReader
[src]
impl Unpin for BarcReader
[src]
impl UnwindSafe for BarcReader
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,