pub struct EcsMaintenance { /* private fields */ }Expand description
Direct ECS maintenance service.
Compacts up to max_per_frame dirty pages each frame, reclaiming the
orphaned rows left by component migrations. This replaces the former
GarbageCollectorAgent.
Implementations§
Source§impl EcsMaintenance
impl EcsMaintenance
Sourcepub fn with_budget(max_per_frame: usize) -> Self
pub fn with_budget(max_per_frame: usize) -> Self
Creates a new maintenance service with a custom per-frame page budget.
Sourcepub fn tick(&mut self, world: &mut World)
pub fn tick(&mut self, world: &mut World)
Runs one frame of maintenance: compacts up to max_per_frame dirty pages.
Dirty pages beyond the budget stay queued for the next frame — harmless, since the query layer already skips orphan rows.
Sourcepub fn last_compacted_count(&self) -> usize
pub fn last_compacted_count(&self) -> usize
Number of pages compacted in the last tick.
Sourcepub fn max_per_frame(&self) -> usize
pub fn max_per_frame(&self) -> usize
The maximum number of pages compacted per frame.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EcsMaintenance
impl RefUnwindSafe for EcsMaintenance
impl Send for EcsMaintenance
impl Sync for EcsMaintenance
impl Unpin for EcsMaintenance
impl UnsafeUnpin for EcsMaintenance
impl UnwindSafe for EcsMaintenance
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