pub struct Env { /* private fields */ }Expand description
The expression environment: the variable bindings produced by evaluating the
prelude (resolution = 32), the injected configurator object, and the
user’s expressions statements in order.
Implementations§
Source§impl Env
impl Env
Sourcepub fn build(
expressions: &str,
configurator_json: &Value,
) -> Result<Env, String>
pub fn build( expressions: &str, configurator_json: &Value, ) -> Result<Env, String>
Build the environment: prelude resolution = 32, then the injected
configurator object, then the user’s expressions statements in order
(users may overwrite resolution). configurator_json may be the full
configurator state ({ values: {...}, ... }) or a bare values map — the
.values sub-object is used when present, matching the prelude.
Sourcepub fn poisoned(msg: String) -> Env
pub fn poisoned(msg: String) -> Env
A poisoned environment: eval() reports msg; numeric params still pass
through. Lets execute_history keep the -> HistoryResult signature and
surface an expression-block error per-feature instead of globally.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Env
impl RefUnwindSafe for Env
impl Send for Env
impl Sync for Env
impl Unpin for Env
impl UnsafeUnpin for Env
impl UnwindSafe for Env
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