Trait EnvironmentRecord
Source pub trait EnvironmentRecord {
// Required methods
fn has_binding(&self, name: &String) -> bool;
fn create_mutable_binding(
&mut self,
name: String,
can_delete: bool,
) -> Result<(), JErrorType>;
fn create_immutable_binding(
&mut self,
name: String,
) -> Result<(), JErrorType>;
fn initialize_binding(
&mut self,
ctx_stack: &mut ExecutionContextStack,
name: String,
value: JsValue,
) -> Result<bool, JErrorType>;
fn set_mutable_binding(
&mut self,
ctx_stack: &mut ExecutionContextStack,
name: String,
value: JsValue,
) -> Result<(), JErrorType>;
fn get_binding_value(
&self,
ctx_stack: &mut ExecutionContextStack,
name: &String,
) -> Result<JsValue, JErrorType>;
fn delete_binding(&mut self, name: &String) -> Result<bool, JErrorType>;
fn has_this_binding(&self) -> bool;
fn has_super_binding(&self) -> bool;
// Provided method
fn get_all_bindings(&self) -> Option<Vec<(String, JsValue)>> { ... }
}
Get all bindings as a vector of (name, value) pairs. Used for generators.