pub struct ReverseJsonlScanner<R> { /* private fields */ }Expand description
Read-only scanner for newline-delimited JSON records, starting from the end.
Implementations§
Source§impl<R> ReverseJsonlScanner<R>
impl<R> ReverseJsonlScanner<R>
pub fn new(reader: R) -> Result<Self>
Sourcepub fn new_at(reader: R, end_byte_offset: u64) -> Result<Self>
pub fn new_at(reader: R, end_byte_offset: u64) -> Result<Self>
Creates a reverse scanner whose logical end is the given byte offset.
This lets callers scan a frozen JSONL prefix without reading records appended after that prefix was captured.
Sourcepub fn scan_next<T>(&mut self) -> Result<Option<ScanOutcome<T>>>where
T: DeserializeOwned,
pub fn scan_next<T>(&mut self) -> Result<Option<ScanOutcome<T>>>where
T: DeserializeOwned,
Scans the next nonblank record.
I/O failures are returned as Err. Invalid JSON records are returned as
ScanOutcome::Rejected, and the scanner remains usable.
Auto Trait Implementations§
impl<R> Freeze for ReverseJsonlScanner<R>where
R: Freeze,
impl<R> RefUnwindSafe for ReverseJsonlScanner<R>where
R: RefUnwindSafe,
impl<R> Send for ReverseJsonlScanner<R>where
R: Send,
impl<R> Sync for ReverseJsonlScanner<R>where
R: Sync,
impl<R> Unpin for ReverseJsonlScanner<R>where
R: Unpin,
impl<R> UnsafeUnpin for ReverseJsonlScanner<R>where
R: UnsafeUnpin,
impl<R> UnwindSafe for ReverseJsonlScanner<R>where
R: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request