pub struct BackingReader<'a> { /* private fields */ }Implementations§
Source§impl<'a> BackingReader<'a>
impl<'a> BackingReader<'a>
pub fn new( file: &'a File, buf: &'a Arc<Mutex<ReadAhead>>, pool: &'a ReadAheadPool, key: usize, backing_len: u64, epoch: &'a AtomicU64, ) -> Self
Sourcepub fn with_prefetch_planning(self) -> Self
pub fn with_prefetch_planning(self) -> Self
Opt into prefetch-plan capture: every backing read sizes the eviction
ring and records the post-read next_expected/window under the read
lock, so the caller reads them via Self::prefetch_plan without a
second lock acquisition (#429).
Sourcepub fn prefetch_plan(&self) -> (u64, u64)
pub fn prefetch_plan(&self) -> (u64, u64)
The (next_expected, window) captured by the most recent backing read,
or (u64::MAX, 0) if no backing read occurred. Only meaningful when
constructed via Self::with_prefetch_planning.
pub fn fills(&self) -> u64
pub fn file(&self) -> &File
pub fn read_exact_at(&self, dst: &mut [u8], abs_offset: u64) -> Result<()>
Auto Trait Implementations§
impl<'a> !Freeze for BackingReader<'a>
impl<'a> !RefUnwindSafe for BackingReader<'a>
impl<'a> !Sync for BackingReader<'a>
impl<'a> Send for BackingReader<'a>
impl<'a> Unpin for BackingReader<'a>
impl<'a> UnsafeUnpin for BackingReader<'a>
impl<'a> UnwindSafe for BackingReader<'a>
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