pub struct SystemManager { /* private fields */ }
Expand description
A system manager that coordinates multiple systems
Implementations§
Source§impl SystemManager
impl SystemManager
Sourcepub fn with_capacity(expected_objects: usize) -> Self
pub fn with_capacity(expected_objects: usize) -> Self
Create a new system manager with expected capacity
Sourcepub fn add_system(&mut self, system: Box<dyn System>)
pub fn add_system(&mut self, system: Box<dyn System>)
Add a system to the manager
Sourcepub fn remove_system(&mut self, name: &str) -> Option<Box<dyn System>>
pub fn remove_system(&mut self, name: &str) -> Option<Box<dyn System>>
Remove a system from the manager
Sourcepub fn system_count(&self) -> usize
pub fn system_count(&self) -> usize
Get system count
Sourcepub async fn register_object(&self, object: Object)
pub async fn register_object(&self, object: Object)
Register an object with the manager
Sourcepub async fn get_object(&self, id: &str) -> Option<Object>
pub async fn get_object(&self, id: &str) -> Option<Object>
Get an object by ID
Sourcepub async fn get_all_objects(&self) -> Vec<Object>
pub async fn get_all_objects(&self) -> Vec<Object>
Get all objects
Sourcepub async fn object_count(&self) -> usize
pub async fn object_count(&self) -> usize
Get object count
Sourcepub async fn clear_objects(&self)
pub async fn clear_objects(&self)
Clear all objects
Sourcepub async fn reserve_objects(&self, additional: usize)
pub async fn reserve_objects(&self, additional: usize)
Reserve capacity for objects
Sourcepub async fn process_all(
&mut self,
priority: Priority,
) -> Result<Vec<ActionResult>>
pub async fn process_all( &mut self, priority: Priority, ) -> Result<Vec<ActionResult>>
Process all objects through all systems
Sourcepub async fn process_with_system(
&mut self,
system_name: &str,
objects: Vec<Object>,
priority: Priority,
) -> Result<Vec<ActionResult>>
pub async fn process_with_system( &mut self, system_name: &str, objects: Vec<Object>, priority: Priority, ) -> Result<Vec<ActionResult>>
Process objects through a specific system
Sourcepub async fn initialize_all(&mut self) -> Result<()>
pub async fn initialize_all(&mut self) -> Result<()>
Initialize all systems
Sourcepub async fn shutdown_all(&mut self) -> Result<()>
pub async fn shutdown_all(&mut self) -> Result<()>
Shutdown all systems
Sourcepub fn get_all_stats(&self) -> HashMap<String, SystemStats>
pub fn get_all_stats(&self) -> HashMap<String, SystemStats>
Get statistics for all systems
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SystemManager
impl !RefUnwindSafe for SystemManager
impl Send for SystemManager
impl Sync for SystemManager
impl Unpin for SystemManager
impl !UnwindSafe for SystemManager
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