pub enum GcState {
Pause,
Propagate,
Atomic,
Sweep,
Finalize,
}Expand description
Phases of the incremental collection cycle.
The state machine matches a simplified subset of C-Lua’s lgc.c FSM and
is driven by Heap::incremental_step_with_post_mark.
Transitions:
Pause→Propagate(on first step: reset colors, trace roots).Propagate→Atomic(when the gray queue empties).Atomic→Sweep(post-mark hook has run; sweep cursor is initialized).Sweep→Finalize(sweep cursor reached the end of allgc).Finalize→Pause(any pending finalize work has been drained).
Collecting is kept as a compatibility alias for the old API (used by
barrier) — it means “anything but Pause.”
Variants§
Implementations§
Trait Implementations§
impl Copy for GcState
impl Eq for GcState
impl StructuralPartialEq for GcState
Auto Trait Implementations§
impl Freeze for GcState
impl RefUnwindSafe for GcState
impl Send for GcState
impl Sync for GcState
impl Unpin for GcState
impl UnsafeUnpin for GcState
impl UnwindSafe for GcState
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