pub enum BisectBudget {
Auto,
MaxProbes(usize),
FullResolution,
}Expand description
How many probes a bisect may spend before giving up on the ranges it has not yet resolved.
Variants§
Auto
2·⌈log₂N⌉ + 1 — the depth needed to isolate one failing item and
resolve every other item as clean. 9 probes at N=10, 15 at N=100.
MaxProbes(usize)
An explicit cap, clamped to at least 1. MaxProbes(1) probes once and
leaves every item unresolved if that probe fails.
FullResolution
No cap: keep splitting until every item is resolved. Worst case
2N - 1 probes for an all-bad batch.
Implementations§
Source§impl BisectBudget
impl BisectBudget
Sourcepub fn effective_cap(self, n: usize) -> usize
pub fn effective_cap(self, n: usize) -> usize
The probe cap this budget implies for a batch of n items.
Trait Implementations§
Source§impl Clone for BisectBudget
impl Clone for BisectBudget
Source§fn clone(&self) -> BisectBudget
fn clone(&self) -> BisectBudget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for BisectBudget
Source§impl Debug for BisectBudget
impl Debug for BisectBudget
Source§impl Default for BisectBudget
impl Default for BisectBudget
Source§fn default() -> BisectBudget
fn default() -> BisectBudget
Returns the “default value” for a type. Read more
impl Eq for BisectBudget
Source§impl PartialEq for BisectBudget
impl PartialEq for BisectBudget
impl StructuralPartialEq for BisectBudget
Auto Trait Implementations§
impl Freeze for BisectBudget
impl RefUnwindSafe for BisectBudget
impl Send for BisectBudget
impl Sync for BisectBudget
impl Unpin for BisectBudget
impl UnsafeUnpin for BisectBudget
impl UnwindSafe for BisectBudget
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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