pub struct AssumptionCache { /* private fields */ }Expand description
Cache of computed assumptions, indexed by ExprId.
Lives on the Context separately from
the arena to avoid lock-ordering issues.
Implementations§
Source§impl AssumptionCache
impl AssumptionCache
Sourcepub fn query(&mut self, arena: &Arena, id: ExprId, prop: Props) -> Option<bool>
pub fn query(&mut self, arena: &Arena, id: ExprId, prop: Props) -> Option<bool>
Query a property for an expression.
If the property is already cached, returns immediately. Otherwise computes it from the expression structure and caches the result.
Sourcepub fn set_symbol_assumptions(&mut self, id: ExprId, assumptions: Assumptions)
pub fn set_symbol_assumptions(&mut self, id: ExprId, assumptions: Assumptions)
Store user-supplied symbol assumptions in the cache.
The set is normalised with Assumptions::normalize_declared.
§Panics
Panics if the declared assumptions are self-contradictory (e.g.
Positive together with Negative, or Integer with
Irrational). Declaring impossible facts about a symbol is a
programming error, on a par with mixing expressions from two
contexts.
Trait Implementations§
Source§impl Debug for AssumptionCache
impl Debug for AssumptionCache
Source§impl Default for AssumptionCache
impl Default for AssumptionCache
Source§fn default() -> AssumptionCache
fn default() -> AssumptionCache
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AssumptionCache
impl RefUnwindSafe for AssumptionCache
impl Send for AssumptionCache
impl Sync for AssumptionCache
impl Unpin for AssumptionCache
impl UnsafeUnpin for AssumptionCache
impl UnwindSafe for AssumptionCache
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> 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