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
sourceimpl DeclarativeEnvironmentRecord
impl DeclarativeEnvironmentRecord
pub fn new(env: Option<Environment>) -> DeclarativeEnvironmentRecord
Trait Implementations
sourceimpl Clone for DeclarativeEnvironmentRecord
impl Clone for DeclarativeEnvironmentRecord
sourcefn clone(&self) -> DeclarativeEnvironmentRecord
fn clone(&self) -> DeclarativeEnvironmentRecord
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for DeclarativeEnvironmentRecord
impl Debug for DeclarativeEnvironmentRecord
sourceimpl Drop for DeclarativeEnvironmentRecord
impl Drop for DeclarativeEnvironmentRecord
sourceimpl EnvironmentRecordTrait for DeclarativeEnvironmentRecord
impl EnvironmentRecordTrait for DeclarativeEnvironmentRecord
sourcefn 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<()>
sourcefn 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<()>
sourcefn initialize_binding(
&self,
name: &str,
value: JsValue,
_context: &mut Context
) -> JsResult<()>
fn initialize_binding(
&self,
name: &str,
value: JsValue,
_context: &mut Context
) -> JsResult<()>
sourcefn 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<()>
sourcefn 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>
sourcefn has_this_binding(&self) -> bool
fn has_this_binding(&self) -> bool
sourcefn has_super_binding(&self) -> bool
fn has_super_binding(&self) -> bool
sourcefn with_base_object(&self) -> Option<JsObject>
fn with_base_object(&self) -> Option<JsObject>
sourcefn 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 environmentsourcefn get_outer_environment_ref(&self) -> Option<&Environment>
fn get_outer_environment_ref(&self) -> Option<&Environment>
Get the next environment up
sourcefn set_outer_environment(&mut self, env: Environment)
fn set_outer_environment(&mut self, env: Environment)
Set the next environment up
sourcefn 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>
sourcefn 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 environmentssourcefn 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
sourcefn 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
sourcefn 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
sourcefn 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
sourceimpl From<DeclarativeEnvironmentRecord> for Environment
impl From<DeclarativeEnvironmentRecord> for Environment
sourcefn from(env: DeclarativeEnvironmentRecord) -> Environment
fn from(env: DeclarativeEnvironmentRecord) -> Environment
Converts to this type from the input type.
sourceimpl Trace for DeclarativeEnvironmentRecord
impl Trace for DeclarativeEnvironmentRecord
sourcefn finalize_glue(&self)
fn finalize_glue(&self)
Runs Finalize::finalize() on this object and all
contained subobjects Read more
Auto Trait Implementations
impl !RefUnwindSafe for DeclarativeEnvironmentRecord
impl !Send for DeclarativeEnvironmentRecord
impl !Sync for DeclarativeEnvironmentRecord
impl Unpin for DeclarativeEnvironmentRecord
impl !UnwindSafe for DeclarativeEnvironmentRecord
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more