pub struct SortPlanner;Expand description
Chooses how a sort runs. Stateless; every input is explicit so the decision is exhaustively unit-testable.
Implementations§
Source§impl SortPlanner
impl SortPlanner
Sourcepub fn plan(
spec: &SortSpec,
snap: &SorterSnapshot,
cfg: &SorterConfig,
) -> SortPlan
pub fn plan( spec: &SortSpec, snap: &SorterSnapshot, cfg: &SorterConfig, ) -> SortPlan
Decide whether spec sorts in memory or spills, and with what run
buffer and fan-in if it spills.
A sort stays in memory only when it both fits under the configured ceiling and the budget has the headroom to hold it. Otherwise it spills, with the fan-in rationed from the global file-descriptor headroom (so concurrent sorts cannot collectively exhaust the fd table) and the run buffer sized against that fan-in to keep the merge-pass depth bounded.
Auto Trait Implementations§
impl Freeze for SortPlanner
impl RefUnwindSafe for SortPlanner
impl Send for SortPlanner
impl Sync for SortPlanner
impl Unpin for SortPlanner
impl UnsafeUnpin for SortPlanner
impl UnwindSafe for SortPlanner
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