pub struct ReadAhead { /* private fields */ }Implementations§
Source§impl ReadAhead
impl ReadAhead
pub fn new(cap: u64) -> Self
pub fn set_max_windows(&mut self, n: usize)
pub fn next_expected(&self) -> u64
Sourcepub fn window(&self) -> u64
pub fn window(&self) -> u64
The current adaptive window size (grows geometrically on sequential access, resets to the floor on seek). Drives prefetch depth.
pub fn len(&self) -> u64
pub fn clear(&mut self) -> u64
pub fn set_cap(&mut self, cap: u64)
pub fn covers(&self, off: u64, len: usize) -> bool
pub fn store_window(&mut self, start: u64, bytes: Vec<u8>) -> (u64, u64)
pub fn read_into( &mut self, dst: &mut [u8], off: u64, backing_len: u64, fill: impl FnMut(&mut [u8], u64) -> Result<()>, ) -> Result<(u64, u64)>
Auto Trait Implementations§
impl Freeze for ReadAhead
impl RefUnwindSafe for ReadAhead
impl Send for ReadAhead
impl Sync for ReadAhead
impl Unpin for ReadAhead
impl UnsafeUnpin for ReadAhead
impl UnwindSafe for ReadAhead
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