Struct umbra_lang::Env [−][src]
pub struct Env<'a> { /* fields omitted */ }
Expand description
The environment that scripts use to store and access variables.
This contains a reference to a parent Env
whose variables are accessible but
immutable.
Implementations
Clones the Core Env
which contains only the variables necessary to
bootstrap the language.
Clones the Prelude Env
which contains the usual variables for writing
programs.
Constructs an Env
with the given parent and no variables.
Creates a recursive Iterator
over all variables in the given Env
and
its parents. Parent variables will come first.
Constructs an Env
with no parent and all the variables of the given Env
and its parents. Duplicate variables will be overwritten by the one in the
child.
Returns the value of the variable with the given name if it exists. This
Env
will be checked first, followed by the parents recursively.
Returns whether the given name corresponds to a variable.
Inserts the given value with the given name as a variable.
Adds all of the variables in the given map to this Env
.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Env<'a>
impl<'a> UnwindSafe for Env<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more