pub struct BandwidthAwarePrefetcher { /* private fields */ }Expand description
Bandwidth-aware prefetch controller
Implementations§
Source§impl BandwidthAwarePrefetcher
impl BandwidthAwarePrefetcher
Sourcepub async fn can_prefetch(&self, size: usize) -> bool
pub async fn can_prefetch(&self, size: usize) -> bool
Checks if bandwidth allows prefetching
Sourcepub async fn record_usage(&self, size: usize)
pub async fn record_usage(&self, size: usize)
Records bandwidth usage
Sourcepub async fn estimated_bandwidth(&self) -> usize
pub async fn estimated_bandwidth(&self) -> usize
Estimates current bandwidth usage rate
Sourcepub fn remaining_bandwidth(&self) -> usize
pub fn remaining_bandwidth(&self) -> usize
Gets the remaining bandwidth in the current window
Auto Trait Implementations§
impl !Freeze for BandwidthAwarePrefetcher
impl !RefUnwindSafe for BandwidthAwarePrefetcher
impl !UnwindSafe for BandwidthAwarePrefetcher
impl Send for BandwidthAwarePrefetcher
impl Sync for BandwidthAwarePrefetcher
impl Unpin for BandwidthAwarePrefetcher
impl UnsafeUnpin for BandwidthAwarePrefetcher
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