Trait mozjs::rust::GCMethods

source ·
pub trait GCMethods {
    // Required methods
    unsafe fn initial() -> Self;
    unsafe fn post_barrier(v: *mut Self, prev: Self, next: Self);
}
Expand description

A trait for types which can place appropriate GC barriers.

  • https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Internals/Garbage_collection#Incremental_marking
  • https://dxr.mozilla.org/mozilla-central/source/js/src/gc/Barrier.h

Required Methods§

source

unsafe fn initial() -> Self

Create a default value

source

unsafe fn post_barrier(v: *mut Self, prev: Self, next: Self)

Place a post-write barrier

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl GCMethods for *mut BigInt

source§

impl GCMethods for *mut Symbol

source§

impl GCMethods for *mut JSFunction

source§

impl GCMethods for *mut JSObject

source§

impl GCMethods for *mut JSScript

source§

impl GCMethods for *mut JSString

Implementors§