Struct EscalationLadder
pub struct EscalationLadder { /* private fields */ }Expand description
The precision tiers a filtered predicate steps through, weakest first.
This is the executable form of the fast-path/escalation design: try a cheap filter, and only pay for stronger arithmetic on the cases that need it. A backend advertises how far it can escalate; a caller learns whether the answer it got was cheap or expensive.
Implementations§
§impl EscalationLadder
impl EscalationLadder
pub const fn new(ceiling: Precision) -> EscalationLadder
pub const fn new(ceiling: Precision) -> EscalationLadder
A ladder that may escalate up to and including ceiling.
pub const fn exact() -> EscalationLadder
pub const fn exact() -> EscalationLadder
A ladder ending in exact arithmetic: every sign is decidable.
pub const fn is_total(self) -> bool
pub const fn is_total(self) -> bool
Whether reaching ceiling guarantees every sign becomes decidable.
Only exact arithmetic does. A ladder topping out at F64 can still
return Uncertain, and a caller that needs a decision must know that.
pub fn next_after(self, current: Precision) -> Option<Precision>
pub fn next_after(self, current: Precision) -> Option<Precision>
The next tier to try after current, or None at the ceiling.
Trait Implementations§
§impl Clone for EscalationLadder
impl Clone for EscalationLadder
§fn clone(&self) -> EscalationLadder
fn clone(&self) -> EscalationLadder
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for EscalationLadder
impl Debug for EscalationLadder
§impl Hash for EscalationLadder
impl Hash for EscalationLadder
§impl PartialEq for EscalationLadder
impl PartialEq for EscalationLadder
impl Copy for EscalationLadder
impl Eq for EscalationLadder
impl StructuralPartialEq for EscalationLadder
Auto Trait Implementations§
impl Freeze for EscalationLadder
impl RefUnwindSafe for EscalationLadder
impl Send for EscalationLadder
impl Sync for EscalationLadder
impl Unpin for EscalationLadder
impl UnwindSafe for EscalationLadder
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