pub struct DeclarativeEnvironmentRecord {
pub env_rec: GcCell<FxHashMap<Box<str>, DeclarativeEnvironmentRecordBinding>>,
pub outer_env: Option<Environment>,
}Expand description
A declarative Environment Record binds the set of identifiers defined by the declarations contained within its scope.
Fields§
§env_rec: GcCell<FxHashMap<Box<str>, DeclarativeEnvironmentRecordBinding>>§outer_env: Option<Environment>Implementations§
Source§impl DeclarativeEnvironmentRecord
impl DeclarativeEnvironmentRecord
pub fn new(env: Option<Environment>) -> DeclarativeEnvironmentRecord
Trait Implementations§
Source§impl Clone for DeclarativeEnvironmentRecord
impl Clone for DeclarativeEnvironmentRecord
Source§fn clone(&self) -> DeclarativeEnvironmentRecord
fn clone(&self) -> DeclarativeEnvironmentRecord
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeclarativeEnvironmentRecord
impl Debug for DeclarativeEnvironmentRecord
Source§impl Drop for DeclarativeEnvironmentRecord
impl Drop for DeclarativeEnvironmentRecord
Source§impl EnvironmentRecordTrait for DeclarativeEnvironmentRecord
impl EnvironmentRecordTrait for DeclarativeEnvironmentRecord
Source§fn create_mutable_binding(
&self,
name: &str,
deletion: bool,
allow_name_reuse: bool,
_context: &mut Context,
) -> JsResult<()>
fn create_mutable_binding( &self, name: &str, deletion: bool, allow_name_reuse: bool, _context: &mut Context, ) -> JsResult<()>
Source§fn create_immutable_binding(
&self,
name: &str,
strict: bool,
_context: &mut Context,
) -> JsResult<()>
fn create_immutable_binding( &self, name: &str, strict: bool, _context: &mut Context, ) -> JsResult<()>
Source§fn initialize_binding(
&self,
name: &str,
value: JsValue,
_context: &mut Context,
) -> JsResult<()>
fn initialize_binding( &self, name: &str, value: JsValue, _context: &mut Context, ) -> JsResult<()>
Source§fn set_mutable_binding(
&self,
name: &str,
value: JsValue,
strict: bool,
context: &mut Context,
) -> JsResult<()>
fn set_mutable_binding( &self, name: &str, value: JsValue, strict: bool, context: &mut Context, ) -> JsResult<()>
Source§fn get_binding_value(
&self,
name: &str,
_strict: bool,
context: &mut Context,
) -> JsResult<JsValue>
fn get_binding_value( &self, name: &str, _strict: bool, context: &mut Context, ) -> JsResult<JsValue>
Source§fn has_this_binding(&self) -> bool
fn has_this_binding(&self) -> bool
Source§fn has_super_binding(&self) -> bool
fn has_super_binding(&self) -> bool
Source§fn with_base_object(&self) -> Option<JsObject>
fn with_base_object(&self) -> Option<JsObject>
Source§fn get_this_binding(&self, _context: &mut Context) -> JsResult<JsValue>
fn get_this_binding(&self, _context: &mut Context) -> JsResult<JsValue>
Return the
this binding from the environmentSource§fn get_outer_environment_ref(&self) -> Option<&Environment>
fn get_outer_environment_ref(&self) -> Option<&Environment>
Get the next environment up
Source§fn set_outer_environment(&mut self, env: Environment)
fn set_outer_environment(&mut self, env: Environment)
Set the next environment up
Source§fn get_environment_type(&self) -> EnvironmentType
fn get_environment_type(&self) -> EnvironmentType
Get the type of environment this is
fn get_outer_environment(&self) -> Option<Environment>
Source§fn recursive_get_this_binding(&self, context: &mut Context) -> JsResult<JsValue>
fn recursive_get_this_binding(&self, context: &mut Context) -> JsResult<JsValue>
Return the
this binding from the environment or try to get it from outer environmentsSource§fn recursive_create_mutable_binding(
&self,
name: &str,
deletion: bool,
scope: VariableScope,
context: &mut Context,
) -> JsResult<()>
fn recursive_create_mutable_binding( &self, name: &str, deletion: bool, scope: VariableScope, context: &mut Context, ) -> JsResult<()>
Create mutable binding while handling outer environments
Source§fn recursive_create_immutable_binding(
&self,
name: &str,
deletion: bool,
scope: VariableScope,
context: &mut Context,
) -> JsResult<()>
fn recursive_create_immutable_binding( &self, name: &str, deletion: bool, scope: VariableScope, context: &mut Context, ) -> JsResult<()>
Create immutable binding while handling outer environments
Source§fn recursive_set_mutable_binding(
&self,
name: &str,
value: JsValue,
strict: bool,
context: &mut Context,
) -> JsResult<()>
fn recursive_set_mutable_binding( &self, name: &str, value: JsValue, strict: bool, context: &mut Context, ) -> JsResult<()>
Set mutable binding while handling outer environments
Source§fn recursive_initialize_binding(
&self,
name: &str,
value: JsValue,
context: &mut Context,
) -> JsResult<()>
fn recursive_initialize_binding( &self, name: &str, value: JsValue, context: &mut Context, ) -> JsResult<()>
Initialize binding while handling outer environments
Source§impl From<DeclarativeEnvironmentRecord> for Environment
impl From<DeclarativeEnvironmentRecord> for Environment
Source§fn from(env: DeclarativeEnvironmentRecord) -> Environment
fn from(env: DeclarativeEnvironmentRecord) -> Environment
Converts to this type from the input type.
Source§impl Trace for DeclarativeEnvironmentRecord
impl Trace for DeclarativeEnvironmentRecord
Source§fn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects
Auto Trait Implementations§
impl !Freeze for DeclarativeEnvironmentRecord
impl !RefUnwindSafe for DeclarativeEnvironmentRecord
impl !Send for DeclarativeEnvironmentRecord
impl !Sync for DeclarativeEnvironmentRecord
impl Unpin for DeclarativeEnvironmentRecord
impl !UnwindSafe for DeclarativeEnvironmentRecord
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