[−][src]Trait zerogc_context::collector::RawCollectorImpl
A specific implementation of a collector
Associated Types
type GcDynPointer: Copy + Debug + 'static
[src]
A dynamic pointer to a GC object
The simple collector implements this as a trait object pointer.
type Ptr: CollectorPtr<Self>
[src]
A pointer to this collector
Must be a ZST if the collector is a singleton.
type Manager: CollectionManager<Self, Context = Self::RawContext>
[src]
The type that manages this collector's state
type RawContext: RawContext<Self>
[src]
The context
Associated Constants
pub const SINGLETON: bool
[src]
True if this collector is a singleton
If the collector allows multiple instances, this must be false
pub const SYNC: bool
[src]
True if this collector is thread-safe.
Required methods
pub unsafe fn create_dyn_pointer<T: Trace>(t: *mut T) -> Self::GcDynPointer
[src]
Convert the specified value into a dyn pointer
pub fn init(logger: Logger) -> NonNull<Self>
[src]
Initialize an instance of the collector
Must panic if the collector is not a singleton
pub unsafe fn gc_write_barrier<'gc, T: ?Sized, V: ?Sized>(
owner: &Gc<'gc, T, CollectorId<Self>>,
value: &Gc<'gc, V, CollectorId<Self>>,
field_offset: usize
) where
T: GcSafe + 'gc,
V: GcSafe + 'gc,
[src]
owner: &Gc<'gc, T, CollectorId<Self>>,
value: &Gc<'gc, V, CollectorId<Self>>,
field_offset: usize
) where
T: GcSafe + 'gc,
V: GcSafe + 'gc,
pub fn logger(&self) -> &Logger
[src]
The logger associated with this collector
pub fn manager(&self) -> &Self::Manager
[src]
pub fn should_collect(&self) -> bool
[src]
pub fn allocated_size(&self) -> MemorySize
[src]
pub unsafe fn perform_raw_collection(&self, contexts: &[*mut Self::RawContext])
[src]
Provided methods
pub fn id(&self) -> CollectorId<Self>
[src]
The id of this collector