pub struct NdjsonReverseFileDriver { /* private fields */ }Expand description
Reverse NDJSON line reader over a seekable file.
The reader scans fixed-size chunks from EOF to BOF and returns owned line bytes in reverse physical order. It keeps only the current chunk and one cross-chunk carry buffer, so memory stays bounded by the longest row plus the configured chunk size.
Implementations§
Source§impl NdjsonReverseFileDriver
impl NdjsonReverseFileDriver
pub fn open<P>(path: P) -> Result<NdjsonReverseFileDriver, RowError>
pub fn with_chunk_size<P>( path: P, chunk_size: usize, ) -> Result<NdjsonReverseFileDriver, RowError>
pub fn with_options<P>( path: P, options: NdjsonOptions, ) -> Result<NdjsonReverseFileDriver, RowError>
pub fn next_line(&mut self) -> Result<Option<Vec<u8>>, RowError>
pub fn next_line_with_reverse_no( &mut self, ) -> Result<Option<(u64, Vec<u8>)>, RowError>
Auto Trait Implementations§
impl Freeze for NdjsonReverseFileDriver
impl RefUnwindSafe for NdjsonReverseFileDriver
impl Send for NdjsonReverseFileDriver
impl Sync for NdjsonReverseFileDriver
impl Unpin for NdjsonReverseFileDriver
impl UnsafeUnpin for NdjsonReverseFileDriver
impl UnwindSafe for NdjsonReverseFileDriver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more