#[repr(C, align(8))]pub struct EnvironmentChain {
pub _bindgen_opaque_blob: [u64; 18],
}Expand description
JS::EnvironmentChain stores a list of objects to put on the environment chain.
Internally the engine will create a non-syntactic ‘with’ environment for each of these objects. Note that ‘with’ environments aren’t optimized well so you should use this class only if you really have to.
The SupportUnscopables enum class controls whether these non-syntactic ‘with’ environments support Symbol.unscopables similar to syntactic ‘with’ statements in JS.
Passing SupportUnscopables::No is better for performance because it lets us skip the Symbol.unscopables property lookup. Some Web APIs require supporting Symbol.unscopables though. In Firefox, SupportUnscopables::Yes is used for event handlers.
Fields§
§_bindgen_opaque_blob: [u64; 18]Trait Implementations§
Source§impl Clone for EnvironmentChain
impl Clone for EnvironmentChain
Source§fn clone(&self) -> EnvironmentChain
fn clone(&self) -> EnvironmentChain
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EnvironmentChain
impl Debug for EnvironmentChain
Source§impl PartialEq for EnvironmentChain
impl PartialEq for EnvironmentChain
impl Copy for EnvironmentChain
impl StructuralPartialEq for EnvironmentChain
Auto Trait Implementations§
impl Freeze for EnvironmentChain
impl RefUnwindSafe for EnvironmentChain
impl Send for EnvironmentChain
impl Sync for EnvironmentChain
impl Unpin for EnvironmentChain
impl UnwindSafe for EnvironmentChain
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 144 bytes