[−][src]Trait zerogc_context::state::CollectionManager
Manages coordination of garbage collections
Associated Types
type Context: RawContext<C>
[src]
Required methods
pub fn new() -> Self
[src]
pub fn is_collecting(&self) -> bool
[src]
pub fn should_trigger_collection(&self) -> bool
[src]
pub unsafe fn freeze_context(&self, context: &Self::Context)
[src]
pub unsafe fn unfreeze_context(&self, context: &Self::Context)
[src]
pub fn prevent_collection<R>(collector: &C, func: impl FnOnce() -> R) -> R
[src]
Attempt to prevent garbage collection for the duration of the closure
This method is OPTIONAL and will panic if unimplemented.
pub unsafe fn free_context(collector: &C, context: *mut Self::Context)
[src]
Free the specified context
Safety
- Assumes the specified pointer is valid
- Assumes there are no more outstanding borrows to values in the context
Implementors
impl<C> CollectionManager<C> for zerogc_context::state::nosync::CollectionManager<C> where
C: RawCollectorImpl<Manager = Self, RawContext = RawContext<C>>,
[src]
C: RawCollectorImpl<Manager = Self, RawContext = RawContext<C>>,
type Context = RawContext<C>
pub fn new() -> Self
[src]
pub fn is_collecting(&self) -> bool
[src]
pub fn should_trigger_collection(&self) -> bool
[src]
pub unsafe fn freeze_context(&self, context: &RawContext<C>)
[src]
pub unsafe fn unfreeze_context(&self, _context: &RawContext<C>)
[src]
pub fn prevent_collection<R>(_collector: &C, _func: impl FnOnce() -> R) -> R
[src]
pub unsafe fn free_context(_collector: &C, _context: *mut Self::Context)
[src]
impl<C> CollectionManager<C> for zerogc_context::state::sync::CollectionManager<C> where
C: SyncCollector,
C: RawCollectorImpl<Manager = Self, RawContext = RawContext<C>>,
[src]
C: SyncCollector,
C: RawCollectorImpl<Manager = Self, RawContext = RawContext<C>>,