pub struct GcObjectHeader {
pub ref_count: i32,
pub gc_obj_type: GcObjectType,
pub mark: u8,
pub free_mark: bool,
pub list_kind: Option<GcListKind>,
pub list_prev: Option<GcId>,
pub list_next: Option<GcId>,
}Expand description
Header shared by all cycle-GC’d objects.
Matches QuickJS JSGCObjectHeader.
Fields§
§ref_count: i32§gc_obj_type: GcObjectType§mark: u8GC-phase flag (not a permanent mark bit). Set to 1 after gc_decref processes the object.
free_mark: boolZombie detection during cycle free, inspired by QuickJS free_mark.
list_kind: Option<GcListKind>§list_prev: Option<GcId>§list_next: Option<GcId>Implementations§
Source§impl GcObjectHeader
impl GcObjectHeader
pub fn new(gc_obj_type: GcObjectType, ref_count: i32) -> Self
Trait Implementations§
Source§impl Clone for GcObjectHeader
impl Clone for GcObjectHeader
Source§fn clone(&self) -> GcObjectHeader
fn clone(&self) -> GcObjectHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GcObjectHeader
impl RefUnwindSafe for GcObjectHeader
impl Send for GcObjectHeader
impl Sync for GcObjectHeader
impl Unpin for GcObjectHeader
impl UnsafeUnpin for GcObjectHeader
impl UnwindSafe for GcObjectHeader
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
Mutably borrows from an owned value. Read more