largest_fitting

Function largest_fitting 

Source
pub fn largest_fitting(
    lo: u64,
    hi: u64,
    fits: &mut dyn FnMut(u64) -> Result<bool, BudgetError>,
) -> Result<Option<u64>, BudgetError>
Expand description

2026-10-02: The largest x in lo..=hi with fits(x), by bisection; None when lo does not fit. fits must be monotone (true up to some x, false after).