pub struct GarbageCollectorAgent { /* private fields */ }Expand description
The agent responsible for garbage collection of orphaned ECS data.
Implementations§
Source§impl GarbageCollectorAgent
impl GarbageCollectorAgent
Sourcepub fn with_dcc_sender(self, sender: Sender<TelemetryEvent>) -> Self
pub fn with_dcc_sender(self, sender: Sender<TelemetryEvent>) -> Self
Attaches a DCC sender for telemetry events.
Sourcepub fn queue_cleanup(&mut self, page_index: PageIndex, domain: SemanticDomain)
pub fn queue_cleanup(&mut self, page_index: PageIndex, domain: SemanticDomain)
Adds a new orphaned data location to the cleanup queue.
Sourcepub fn queue_vacuum(&mut self, page_index: u32, hole_row_index: u32)
pub fn queue_vacuum(&mut self, page_index: u32, hole_row_index: u32)
Adds a vacuum request for a page hole.
Sourcepub fn run(&mut self, world: &mut World)
pub fn run(&mut self, world: &mut World)
Runs the agent’s decision-making and execution logic for one frame.
Sourcepub fn pending_count(&self) -> usize
pub fn pending_count(&self) -> usize
Returns the total count of pending cleanup items.
Sourcepub fn current_strategy(&self) -> StrategyId
pub fn current_strategy(&self) -> StrategyId
Returns the current strategy.
Sourcepub fn max_cleanup_per_frame(&self) -> usize
pub fn max_cleanup_per_frame(&self) -> usize
Returns the maximum cleanup operations per frame.
Trait Implementations§
Source§impl Agent for GarbageCollectorAgent
impl Agent for GarbageCollectorAgent
Source§fn negotiate(&mut self, _request: NegotiationRequest) -> NegotiationResponse
fn negotiate(&mut self, _request: NegotiationRequest) -> NegotiationResponse
Negotiates with the DCC to determine the best execution strategy
given the current global resource constraints and priorities.
Source§fn apply_budget(&mut self, budget: ResourceBudget)
fn apply_budget(&mut self, budget: ResourceBudget)
Applies a resource budget issued by the DCC.
The agent must adjust its internal logic (e.g., LOD, quality settings)
to stay within the allocated limits.
Source§fn update(&mut self, context: &mut EngineContext<'_>)
fn update(&mut self, context: &mut EngineContext<'_>)
Periodically updates the agent’s internal state.
Source§fn report_status(&self) -> AgentStatus
fn report_status(&self) -> AgentStatus
Reports the current status and health of the agent.
Source§fn execute(&mut self)
fn execute(&mut self)
Executes the agent’s primary function for this frame.
Called after update(), this is where the agent performs its main work.
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Allows mutable downcasting to concrete agent types.
Auto Trait Implementations§
impl Freeze for GarbageCollectorAgent
impl RefUnwindSafe for GarbageCollectorAgent
impl Send for GarbageCollectorAgent
impl Sync for GarbageCollectorAgent
impl Unpin for GarbageCollectorAgent
impl UnwindSafe for GarbageCollectorAgent
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§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().