pub enum PredictionFacetDemandV2 {
Exact(usize),
NPlusOne,
}Expand description
Bounded candidate demand reported before V2 production-rule evaluation.
A producer must count only until the first excess candidate. NPlusOne
never carries or retains the omitted candidate payload; it says only that
demand is greater than the per-rule bound. The file allocator consumes this
value before any rule emits facets, preventing orphaned finding bindings.
Variants§
Exact(usize)
The exact demand was counted within the bound.
NPlusOne
Counting reached the first candidate after the bound.
Implementations§
Source§impl PredictionFacetDemandV2
impl PredictionFacetDemandV2
Sourcepub fn exact(count: usize) -> Result<Self, PredictionContractError>
pub fn exact(count: usize) -> Result<Self, PredictionContractError>
Construct a bounded exact demand.
Sourcepub const fn bounded_count(self) -> usize
pub const fn bounded_count(self) -> usize
Return the retained candidate count, treating N+1 as the cap.
Sourcepub const fn overflowed(self) -> bool
pub const fn overflowed(self) -> bool
Whether the actual demand exceeded the counted bound.
Trait Implementations§
Source§impl Clone for PredictionFacetDemandV2
impl Clone for PredictionFacetDemandV2
Source§fn clone(&self) -> PredictionFacetDemandV2
fn clone(&self) -> PredictionFacetDemandV2
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 PredictionFacetDemandV2
Source§impl Debug for PredictionFacetDemandV2
impl Debug for PredictionFacetDemandV2
impl Eq for PredictionFacetDemandV2
Source§impl PartialEq for PredictionFacetDemandV2
impl PartialEq for PredictionFacetDemandV2
impl StructuralPartialEq for PredictionFacetDemandV2
Auto Trait Implementations§
impl Freeze for PredictionFacetDemandV2
impl RefUnwindSafe for PredictionFacetDemandV2
impl Send for PredictionFacetDemandV2
impl Sync for PredictionFacetDemandV2
impl Unpin for PredictionFacetDemandV2
impl UnsafeUnpin for PredictionFacetDemandV2
impl UnwindSafe for PredictionFacetDemandV2
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