pub struct WorldStateEngine { /* private fields */ }Expand description
World State Engine
Central coordinator that aggregates state from all MockForge subsystems and provides a unified view of the entire system state.
Implementations§
Source§impl WorldStateEngine
impl WorldStateEngine
Sourcepub fn register_aggregator(&mut self, aggregator: Arc<dyn StateAggregator>)
pub fn register_aggregator(&mut self, aggregator: Arc<dyn StateAggregator>)
Register an aggregator for a layer
Sourcepub async fn create_snapshot(&self) -> Result<WorldStateSnapshot>
pub async fn create_snapshot(&self) -> Result<WorldStateSnapshot>
Create a snapshot of the current world state
Sourcepub async fn get_current_snapshot(&self) -> Result<WorldStateSnapshot>
pub async fn get_current_snapshot(&self) -> Result<WorldStateSnapshot>
Get the current world state snapshot
Sourcepub async fn get_snapshot(
&self,
snapshot_id: &str,
) -> Option<WorldStateSnapshot>
pub async fn get_snapshot( &self, snapshot_id: &str, ) -> Option<WorldStateSnapshot>
Get a snapshot by ID
Sourcepub async fn get_all_snapshots(&self) -> Vec<WorldStateSnapshot>
pub async fn get_all_snapshots(&self) -> Vec<WorldStateSnapshot>
Get all available snapshots
Sourcepub async fn query(&self, query: &WorldStateQuery) -> Result<WorldStateSnapshot>
pub async fn query(&self, query: &WorldStateQuery) -> Result<WorldStateSnapshot>
Query the current world state with filters
Sourcepub fn get_layers(&self) -> Vec<StateLayer>
pub fn get_layers(&self) -> Vec<StateLayer>
Get available layers
Sourcepub fn set_max_snapshots(&mut self, max: usize)
pub fn set_max_snapshots(&mut self, max: usize)
Set maximum number of snapshots to keep
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorldStateEngine
impl !RefUnwindSafe for WorldStateEngine
impl Send for WorldStateEngine
impl Sync for WorldStateEngine
impl Unpin for WorldStateEngine
impl !UnwindSafe for WorldStateEngine
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