pub struct Environment { /* private fields */ }
Expand description
An Environment
is a hashmap in which SAP variables and functions are stored. It
also contains an optional reference to the outer environment. This creates a tree of
environments, where each environment can lookup all the variables and functions of
it’s parent enviornment.
Implementations§
Source§impl Environment
impl Environment
pub fn new() -> Self
Sourcepub fn new_enclosed_environment(outer: &EnvRef) -> Self
pub fn new_enclosed_environment(outer: &EnvRef) -> Self
Creates a new child Environment
to the given outer
environment.
Equivalent to:
ⓘ
let mut env = Environment::new();
env.outer = Some(Rc::clone(outer));
Trait Implementations§
Source§impl Debug for Environment
impl Debug for Environment
Source§impl Display for Environment
Implements the Display
trait for Environment
. This allows an Environment
to
be printed in a human-readable format.
impl Display for Environment
Implements the Display
trait for Environment
. This allows an Environment
to
be printed in a human-readable format.
Source§impl PartialEq for Environment
impl PartialEq for Environment
impl StructuralPartialEq for Environment
Auto Trait Implementations§
impl Freeze for Environment
impl !RefUnwindSafe for Environment
impl !Send for Environment
impl !Sync for Environment
impl Unpin for Environment
impl !UnwindSafe for Environment
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