pub struct Config<const CATEGORIES: usize> {
pub pools: [PoolConfig; CATEGORIES],
pub categories: [CategoryConfig; CATEGORIES],
pub max_in_flight: u8,
pub step_budget: u32,
pub backoff: Backoff,
pub displace_margin: u32,
pub max_victim_tier: [u8; 5],
pub protect_wanted: [bool; 5],
pub cancel_for_demand: bool,
}Expand description
Everything configurable about a crate::Residency. CATEGORIES is both
the number of category numbers in use and the number of pools.
Fields§
§pools: [PoolConfig; CATEGORIES]Page pools, indexed by pool number.
categories: [CategoryConfig; CATEGORIES]Category budgets, indexed by crate::Category::number. A key whose
category number is out of range is ignored (and counted).
max_in_flight: u8Requests the transport may hold at once (the design’s queue depth is 2). Cancelling requests do not count.
step_budget: u32Bookkeeping budget per crate::Residency::step, in work units (see
the crate docs). u32::MAX means unlimited.
backoff: BackoffRetry schedule for failed reads and installs.
displace_margin: u32A wanted entry of the same class as a requester is displaced only when it is farther than the requester by more than this (distance units), so two entries of nearly equal distance cannot trade places each frame.
max_victim_tier: [u8; 5]Per requester class, the highest victim tier it may evict: 0 is an
unwanted entry beyond the keep radius, 1 an unwanted entry inside the
hysteresis band, 2 a wanted entry of lower priority than the
requester. Indexed by Class::as_index.
protect_wanted: [bool; 5]Per class, whether an entry wanted at that class this frame can never
be evicted this frame. Indexed by Class::as_index.
cancel_for_demand: boolLet a Class::Demand miss cancel the least urgent in-flight request
when the transport is at depth.
Implementations§
Trait Implementations§
impl<const CATEGORIES: usize> Copy for Config<CATEGORIES>
impl<const CATEGORIES: usize> Eq for Config<CATEGORIES>
impl<const CATEGORIES: usize> StructuralPartialEq for Config<CATEGORIES>
Auto Trait Implementations§
impl<const CATEGORIES: usize> Freeze for Config<CATEGORIES>
impl<const CATEGORIES: usize> RefUnwindSafe for Config<CATEGORIES>
impl<const CATEGORIES: usize> Send for Config<CATEGORIES>
impl<const CATEGORIES: usize> Sync for Config<CATEGORIES>
impl<const CATEGORIES: usize> Unpin for Config<CATEGORIES>
impl<const CATEGORIES: usize> UnsafeUnpin for Config<CATEGORIES>
impl<const CATEGORIES: usize> UnwindSafe for Config<CATEGORIES>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)