#[repr(C)]pub struct ClassExtension {
pub objectMovedOp: JSObjectMovedOp,
}Fields§
§objectMovedOp: JSObjectMovedOpOptional hook called when an object is moved by generational or compacting GC.
There may exist weak pointers to an object that are not traced through when the normal trace APIs are used, for example objects in the wrapper cache. This hook allows these pointers to be updated.
Note that this hook can be called before JS_NewObject() returns if a GC is triggered during construction of the object. This can happen for global objects for example.
The function should return the difference between nursery bytes used and tenured bytes used, which may be nonzero e.g. if some nursery-allocated data beyond the actual GC thing is moved into malloced memory.
This is used to compute the nursery promotion rate.
Trait Implementations§
Source§impl Clone for ClassExtension
impl Clone for ClassExtension
Source§fn clone(&self) -> ClassExtension
fn clone(&self) -> ClassExtension
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ClassExtension
impl Debug for ClassExtension
Source§impl PartialEq for ClassExtension
impl PartialEq for ClassExtension
impl Copy for ClassExtension
impl StructuralPartialEq for ClassExtension
Auto Trait Implementations§
impl Freeze for ClassExtension
impl RefUnwindSafe for ClassExtension
impl Send for ClassExtension
impl Sync for ClassExtension
impl Unpin for ClassExtension
impl UnwindSafe for ClassExtension
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: 8 bytes