Trait zerogc_context::collector::RawCollectorImpl[][src]

pub unsafe trait RawCollectorImpl: 'static + Sized {
    type DynTracePtr: Copy + Debug + 'static;
    type Config: Sized + Default;
    type Ptr: CollectorPtr<Self>;
    type Manager: CollectionManager<Self, Context = Self::RawContext>;
    type RawContext: RawContext<Self>;
    type RawVecRepr: GcVecRepr;

    const SINGLETON: bool;
    const SYNC: bool;

    fn id_for_gc<'a, 'gc, T: ?Sized>(
        gc: &'a Gc<'gc, T, CollectorId<Self>>
    ) -> &'a CollectorId<Self>
    where
        'gc: 'a,
        T: GcSafe + ?Sized + 'gc
;
fn id_for_array<'a, 'gc, T>(
        gc: &'a GcArray<'gc, T, CollectorId<Self>>
    ) -> &'a CollectorId<Self>
    where
        'gc: 'a,
        T: GcSafe + 'gc
;
fn resolve_array_len<'gc, T>(
        gc: GcArray<'gc, T, CollectorId<Self>>
    ) -> usize
    where
        T: GcSafe + 'gc
;
unsafe fn as_dyn_trace_pointer<T: Trace>(t: *mut T) -> Self::DynTracePtr;
fn init(config: Self::Config, logger: Logger) -> NonNull<Self>;
unsafe fn gc_write_barrier<'gc, O: ?Sized, V: ?Sized>(
        owner: &Gc<'gc, O, CollectorId<Self>>,
        value: &Gc<'gc, V, CollectorId<Self>>,
        field_offset: usize
    )
    where
        O: GcSafe + ?Sized + 'gc,
        V: GcSafe + ?Sized + 'gc
;
fn logger(&self) -> &Logger;
fn manager(&self) -> &Self::Manager;
fn should_collect(&self) -> bool;
fn allocated_size(&self) -> MemorySize;
unsafe fn perform_raw_collection(&self, contexts: &[*mut Self::RawContext]); fn id(&self) -> CollectorId<Self> { ... } }
Expand description

A specific implementation of a collector

Associated Types

A dynamic pointer to a Trace root

The simple collector implements this as a trait object pointer.

The configuration

A pointer to this collector

Must be a ZST if the collector is a singleton.

The type that manages this collector’s state

The context

The raw representation of a vec

Associated Constants

True if this collector is a singleton

If the collector allows multiple instances, this must be false

True if this collector is thread-safe.

Required methods

Convert the specified value into a dyn pointer

Initialize an instance of the collector

Must panic if the collector is not a singleton

The logger associated with this collector

Provided methods

The id of this collector

Implementors