pub struct Reader<'a, E: Context, V: Codec> { /* private fields */ }Expand description
A reader over a variable journal.
Trait Implementations§
Source§impl<E: Context, V: CodecShared> Contiguous for Reader<'_, E, V>
impl<E: Context, V: CodecShared> Contiguous for Reader<'_, E, V>
Source§fn bounds(&self) -> Range<u64>
fn bounds(&self) -> Range<u64>
Returns [start, end) with a guaranteed stable pruning boundary.
Source§async fn read(&self, position: u64) -> Result<V, Error>
async fn read(&self, position: u64) -> Result<V, Error>
Read the item at the given position. Read more
Source§async fn read_many(&self, positions: &[u64]) -> Result<Vec<V>, Error>
async fn read_many(&self, positions: &[u64]) -> Result<Vec<V>, Error>
Read multiple items at the given positions, which must be strictly increasing. Read more
Source§fn try_read_sync(&self, position: u64) -> Option<V>
fn try_read_sync(&self, position: u64) -> Option<V>
Read an item if it can be done synchronously (e.g. without I/O), returning
None
otherwise. Decode failures surface as None and the async read path reports the error.Source§fn try_read_many_sync(&self, positions: &[u64]) -> Vec<Option<V>>
fn try_read_many_sync(&self, positions: &[u64]) -> Vec<Option<V>>
Probe multiple strictly increasing positions, serving those that can be read
synchronously (e.g. from a page cache) and returning one slot per position. Positions
that require I/O, fail to decode, or fall outside
bounds() decline to None. The
async read paths are the sole error authority for declined positions.Auto Trait Implementations§
impl<'a, E, V> !RefUnwindSafe for Reader<'a, E, V>
impl<'a, E, V> !UnwindSafe for Reader<'a, E, V>
impl<'a, E, V> Freeze for Reader<'a, E, V>
impl<'a, E, V> Send for Reader<'a, E, V>
impl<'a, E, V> Sync for Reader<'a, E, V>
impl<'a, E, V> Unpin for Reader<'a, E, V>
impl<'a, E, V> UnsafeUnpin for Reader<'a, E, V>
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> 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>
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more