pub struct PEEnv { /* private fields */ }Expand description
Partial-evaluation environment: a map from variable name to its known PEValue.
Variables are represented as zero-arity predicates in TLExpr (e.g. Pred { name: "x", args: [] }).
This environment records which of those logical variables have been concretised.
Implementations§
Source§impl PEEnv
impl PEEnv
Sourcepub fn with_f64(self, var: impl Into<String>, val: f64) -> Self
pub fn with_f64(self, var: impl Into<String>, val: f64) -> Self
Builder-style helper: bind a floating-point variable.
Sourcepub fn with_bool(self, var: impl Into<String>, val: bool) -> Self
pub fn with_bool(self, var: impl Into<String>, val: bool) -> Self
Builder-style helper: bind a boolean variable.
Sourcepub fn bind_f64(&mut self, var: impl Into<String>, val: f64)
pub fn bind_f64(&mut self, var: impl Into<String>, val: f64)
Mutably bind a floating-point variable.
Sourcepub fn bind_bool(&mut self, var: impl Into<String>, val: bool)
pub fn bind_bool(&mut self, var: impl Into<String>, val: bool)
Mutably bind a boolean variable.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PEEnv
impl RefUnwindSafe for PEEnv
impl Send for PEEnv
impl Sync for PEEnv
impl Unpin for PEEnv
impl UnsafeUnpin for PEEnv
impl UnwindSafe for PEEnv
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