pub struct PrefetchPolicy {
pub budget: usize,
}Expand description
A reader-side SpillPolicy that materializes Paged entries near
the front of the queue up to a byte budget. The writer-side dual of
super::threshold::Threshold: the writer pages data out, the reader
pages data back in — both through SpillPolicy::apply.
Fields§
§budget: usizeMaximum bytes to materialize per apply invocation.
Implementations§
Source§impl PrefetchPolicy
impl PrefetchPolicy
Sourcepub fn new(budget: usize) -> PrefetchPolicy
pub fn new(budget: usize) -> PrefetchPolicy
Create a prefetch policy with the given byte budget.
Trait Implementations§
Source§impl SpillPolicy for PrefetchPolicy
impl SpillPolicy for PrefetchPolicy
Auto Trait Implementations§
impl Freeze for PrefetchPolicy
impl RefUnwindSafe for PrefetchPolicy
impl Send for PrefetchPolicy
impl Sync for PrefetchPolicy
impl Unpin for PrefetchPolicy
impl UnsafeUnpin for PrefetchPolicy
impl UnwindSafe for PrefetchPolicy
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> 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