pub struct ReferenceTracker { /* private fields */ }Expand description
Reference tracking system
Implementations§
Source§impl ReferenceTracker
impl ReferenceTracker
pub fn new() -> Self
Sourcepub fn add_reference(&mut self, from: usize, to: usize)
pub fn add_reference(&mut self, from: usize, to: usize)
Add reference between objects
Sourcepub fn remove_reference(&mut self, from: usize, to: usize)
pub fn remove_reference(&mut self, from: usize, to: usize)
Remove reference between objects
Sourcepub fn remove_root(&mut self, obj: usize)
pub fn remove_root(&mut self, obj: usize)
Remove root reference
Sourcepub fn get_reachable_objects(&self) -> HashSet<usize>
pub fn get_reachable_objects(&self) -> HashSet<usize>
Get all objects reachable from roots
Sourcepub fn write_barrier(&mut self, source: usize, target: usize)
pub fn write_barrier(&mut self, source: usize, target: usize)
Record write barrier for concurrent GC
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ReferenceTracker
impl RefUnwindSafe for ReferenceTracker
impl Send for ReferenceTracker
impl Sync for ReferenceTracker
impl Unpin for ReferenceTracker
impl UnwindSafe for ReferenceTracker
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