#[repr(u8)]pub enum RootKind {
Strong = 0,
YoungCodeCacheRoots = 1,
Weak = 2,
}Expand description
The kind of a set of roots. Used by LXR to decide how roots should be processed (e.g. reference counting and remembered-set recording).
Variants§
Strong = 0
Ordinary strong roots, e.g. mutator stacks and globals. These are reference-counted and marked like any other strong reference.
YoungCodeCacheRoots = 1
Roots held by recently JIT-compiled (“young”) code-cache entries. These are recorded into the remembered set (instead of being reference-counted) so the code cache can be re-scanned on a later GC.
Weak = 2
Roots that hold weak references. These must not keep their referents alive and are not reference-counted.
Implementations§
Source§impl RootKind
impl RootKind
Sourcepub fn should_record_remset(&self) -> bool
pub fn should_record_remset(&self) -> bool
Whether roots of this kind should be recorded into the remembered set rather than being processed like normal roots.
Sourcepub fn should_skip_mark_and_decs(&self) -> bool
pub fn should_skip_mark_and_decs(&self) -> bool
Whether roots of this kind should skip marking and reference-count decrements.
Sourcepub fn should_skip_decs(&self) -> bool
pub fn should_skip_decs(&self) -> bool
Whether roots of this kind should skip reference-count decrements.
Trait Implementations§
impl Copy for RootKind
impl Eq for RootKind
impl StructuralPartialEq for RootKind
Auto Trait Implementations§
impl Freeze for RootKind
impl RefUnwindSafe for RootKind
impl Send for RootKind
impl Sync for RootKind
impl Unpin for RootKind
impl UnwindSafe for RootKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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