pub enum PreconditionDecision {
Reached(f64),
Blocked(PreconditionBlock),
}Expand description
Decision returned by precondition_confidence. Carries either a confidence value or a
structured block reason.
Variants§
Reached(f64)
Request reached the relevant layer. Confidence in [0.0, 1.0].
Blocked(PreconditionBlock)
Hard block — Contradictory must be downgraded to Inapplicable.
Implementations§
Source§impl PreconditionDecision
impl PreconditionDecision
Sourcepub fn confidence(self) -> f64
pub fn confidence(self) -> f64
Confidence value for the modifier. Blocked → 0.0; Reached(c) → c.
Sourcepub fn block_reason(self) -> Option<PreconditionBlock>
pub fn block_reason(self) -> Option<PreconditionBlock>
Block reason if decision is blocked, else None.
Trait Implementations§
Source§impl Clone for PreconditionDecision
impl Clone for PreconditionDecision
Source§fn clone(&self) -> PreconditionDecision
fn clone(&self) -> PreconditionDecision
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 moreSource§impl Debug for PreconditionDecision
impl Debug for PreconditionDecision
Source§impl PartialEq for PreconditionDecision
impl PartialEq for PreconditionDecision
Source§fn eq(&self, other: &PreconditionDecision) -> bool
fn eq(&self, other: &PreconditionDecision) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for PreconditionDecision
impl StructuralPartialEq for PreconditionDecision
Auto Trait Implementations§
impl Freeze for PreconditionDecision
impl RefUnwindSafe for PreconditionDecision
impl Send for PreconditionDecision
impl Sync for PreconditionDecision
impl Unpin for PreconditionDecision
impl UnsafeUnpin for PreconditionDecision
impl UnwindSafe for PreconditionDecision
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