pub struct ReadaheadMetadataCache<F: MetadataFetch> { /* private fields */ }Expand description
A MetadataFetch implementation that caches fetched data in exponentially growing chunks, sequentially from the beginning of the file.
Implementations§
Source§impl<F: MetadataFetch> ReadaheadMetadataCache<F>
impl<F: MetadataFetch> ReadaheadMetadataCache<F>
Sourcepub fn new(inner: F) -> Self
pub fn new(inner: F) -> Self
Create a new ReadaheadMetadataCache wrapping the given MetadataFetch
Sourcepub fn with_initial_size(self, initial: u64) -> Self
pub fn with_initial_size(self, initial: u64) -> Self
Set the initial fetch size in bytes, otherwise defaults to 32 KiB
Sourcepub fn with_multiplier(self, multiplier: f64) -> Self
pub fn with_multiplier(self, multiplier: f64) -> Self
Set the multiplier for subsequent fetch sizes, otherwise defaults to 2.0
Trait Implementations§
Source§impl<F: Debug + MetadataFetch> Debug for ReadaheadMetadataCache<F>
impl<F: Debug + MetadataFetch> Debug for ReadaheadMetadataCache<F>
Source§impl<F: MetadataFetch + Send + Sync> MetadataFetch for ReadaheadMetadataCache<F>
impl<F: MetadataFetch + Send + Sync> MetadataFetch for ReadaheadMetadataCache<F>
Auto Trait Implementations§
impl<F> Freeze for ReadaheadMetadataCache<F>where
F: Freeze,
impl<F> !RefUnwindSafe for ReadaheadMetadataCache<F>
impl<F> Send for ReadaheadMetadataCache<F>
impl<F> Sync for ReadaheadMetadataCache<F>
impl<F> Unpin for ReadaheadMetadataCache<F>where
F: Unpin,
impl<F> !UnwindSafe for ReadaheadMetadataCache<F>
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