System

Trait System 

Source
pub trait System: Send + Sync {
    // Required methods
    fn name(&self) -> &str;
    fn description(&self) -> &str;
    fn process<'life0, 'async_trait>(
        &'life0 mut self,
        objects: Vec<Object>,
        priority: Priority,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ActionResult>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    fn initialize<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn shutdown<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
    fn priority(&self) -> Priority { ... }
    fn is_ready(&self) -> bool { ... }
    fn get_stats(&self) -> SystemStats { ... }
}
Expand description

A system represents orchestration that coordinates actions and manages resources

Required Methods§

Source

fn name(&self) -> &str

Get the name of this system

Source

fn description(&self) -> &str

Get the description of this system

Source

fn process<'life0, 'async_trait>( &'life0 mut self, objects: Vec<Object>, priority: Priority, ) -> Pin<Box<dyn Future<Output = Result<Vec<ActionResult>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Process objects with the given priority

Provided Methods§

Source

fn initialize<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Initialize the system

Source

fn shutdown<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Shutdown the system

Source

fn priority(&self) -> Priority

Get the priority of this system

Source

fn is_ready(&self) -> bool

Check if the system is ready to process

Source

fn get_stats(&self) -> SystemStats

Get system statistics

Implementors§