pub struct GlobalEnvironmentRecord {
pub object_record: ObjectEnvironmentRecord,
pub global_this_binding: JsObject,
pub declarative_record: DeclarativeEnvironmentRecord,
pub var_names: GcCell<FxHashSet<Box<str>>>,
}
Fields
object_record: ObjectEnvironmentRecord
global_this_binding: JsObject
declarative_record: DeclarativeEnvironmentRecord
var_names: GcCell<FxHashSet<Box<str>>>
Implementations
sourceimpl GlobalEnvironmentRecord
impl GlobalEnvironmentRecord
pub fn new(global: JsObject, this_value: JsObject) -> GlobalEnvironmentRecord
sourcepub fn has_var_declaration(&self, name: &str) -> bool
pub fn has_var_declaration(&self, name: &str) -> bool
sourcepub fn has_restricted_global_property(
&self,
name: &str,
context: &mut Context
) -> JsResult<bool>
pub fn has_restricted_global_property(
&self,
name: &str,
context: &mut Context
) -> JsResult<bool>
sourcepub fn can_declare_global_function(
&self,
name: &str,
context: &mut Context
) -> JsResult<bool>
pub fn can_declare_global_function(
&self,
name: &str,
context: &mut Context
) -> JsResult<bool>
sourcepub fn create_global_var_binding(
&mut self,
name: &str,
deletion: bool,
context: &mut Context
) -> JsResult<()>
pub fn create_global_var_binding(
&mut self,
name: &str,
deletion: bool,
context: &mut Context
) -> JsResult<()>
Trait Implementations
sourceimpl Clone for GlobalEnvironmentRecord
impl Clone for GlobalEnvironmentRecord
sourcefn clone(&self) -> GlobalEnvironmentRecord
fn clone(&self) -> GlobalEnvironmentRecord
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 GlobalEnvironmentRecord
impl Debug for GlobalEnvironmentRecord
sourceimpl Drop for GlobalEnvironmentRecord
impl Drop for GlobalEnvironmentRecord
sourceimpl EnvironmentRecordTrait for GlobalEnvironmentRecord
impl EnvironmentRecordTrait for GlobalEnvironmentRecord
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>
fn get_outer_environment(&self) -> Option<Environment>
sourcefn 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
sourcefn 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
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 environmentssourceimpl Finalize for GlobalEnvironmentRecord
impl Finalize for GlobalEnvironmentRecord
sourceimpl From<GlobalEnvironmentRecord> for Environment
impl From<GlobalEnvironmentRecord> for Environment
sourcefn from(env: GlobalEnvironmentRecord) -> Environment
fn from(env: GlobalEnvironmentRecord) -> Environment
Converts to this type from the input type.
sourceimpl Trace for GlobalEnvironmentRecord
impl Trace for GlobalEnvironmentRecord
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 GlobalEnvironmentRecord
impl !Send for GlobalEnvironmentRecord
impl !Sync for GlobalEnvironmentRecord
impl Unpin for GlobalEnvironmentRecord
impl !UnwindSafe for GlobalEnvironmentRecord
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