Trait zerogc::GcVisitor[][src]

pub unsafe trait GcVisitor: Sized {
    type Err: Debug;
    unsafe fn visit_gc<'gc, T: GcSafe + 'gc, Id: CollectorId>(
        &mut self,
        gc: &mut Gc<'gc, T, Id>
    ) -> Result<(), Self::Err>; fn visit<T: Trace + ?Sized>(
        &mut self,
        value: &mut T
    ) -> Result<(), Self::Err> { ... }
fn visit_immutable<T: TraceImmutable + ?Sized>(
        &mut self,
        value: &T
    ) -> Result<(), Self::Err> { ... } }

Visits garbage collected objects

This should only be used by a GcSystem

Associated Types

type Err: Debug[src]

The type of errors returned by this visitor

Loading content...

Required methods

unsafe fn visit_gc<'gc, T: GcSafe + 'gc, Id: CollectorId>(
    &mut self,
    gc: &mut Gc<'gc, T, Id>
) -> Result<(), Self::Err>
[src]

Visit a garbage collected pointer

Safety

Undefined behavior if the GC pointer isn’t properly visited.

Loading content...

Provided methods

fn visit<T: Trace + ?Sized>(&mut self, value: &mut T) -> Result<(), Self::Err>[src]

Visit a reference to the specified value

fn visit_immutable<T: TraceImmutable + ?Sized>(
    &mut self,
    value: &T
) -> Result<(), Self::Err>
[src]

Visit a reference to the specified value

Loading content...

Implementors

Loading content...