pub struct MarkSweepCollector { /* private fields */ }Expand description
Mark and sweep garbage collector
Implementations§
Source§impl MarkSweepCollector
impl MarkSweepCollector
pub fn new(config: MarkSweepConfig) -> Self
Trait Implementations§
Source§impl GarbageCollector for MarkSweepCollector
impl GarbageCollector for MarkSweepCollector
fn name(&self) -> &str
fn can_collect(&self, region: &MemoryRegion) -> bool
fn estimate_collection_time(&self, region: &MemoryRegion) -> Duration
fn collect( &mut self, region: &mut MemoryRegion, tracker: &mut ReferenceTracker, ) -> Result<GCResult, GCError>
fn get_statistics(&self) -> GCCollectorStats
fn configure(&mut self, config: &GCConfig)
Auto Trait Implementations§
impl Freeze for MarkSweepCollector
impl RefUnwindSafe for MarkSweepCollector
impl Send for MarkSweepCollector
impl Sync for MarkSweepCollector
impl Unpin for MarkSweepCollector
impl UnsafeUnpin for MarkSweepCollector
impl UnwindSafe for MarkSweepCollector
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more