pub trait VisualizerAdditionalApplicabilityFilter: Send + Sync {
// Required method
fn update_applicability(&mut self, _event: &ChunkStoreEvent) -> bool;
}
Expand description
Additional filter for applicability on top of the default check for required components.
Required Methods§
sourcefn update_applicability(&mut self, _event: &ChunkStoreEvent) -> bool
fn update_applicability(&mut self, _event: &ChunkStoreEvent) -> bool
Updates the internal applicability filter state based on the given events.
Called for every update no matter whether the entity is already has all required components or not.
Returns true if the entity changed in the event is now applicable to the visualizer, false otherwise.
Once a entity passes this filter, it can never go back to being filtered out.
This implies that the filter does not need to be stateful.
It is perfectly fine to return true
only if something in the diff is regarded as applicable and false otherwise.
(However, if necessary, the applicability filter can keep track of state.)