pub trait Environment: Send + Sync {
    // Required methods
    fn id(&self) -> u64;
    fn get_next_process_id(&self) -> u64;
    fn get_process(&self, id: u64) -> Option<Arc<dyn Process>>;
    fn add_process(&self, id: u64, proc: Arc<dyn Process>);
    fn remove_process(&self, id: u64);
    fn process_count(&self) -> usize;
    fn can_spawn_next_process<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Option<()>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send(&self, id: u64, signal: Signal);
}

Required Methods§

source

fn id(&self) -> u64

source

fn get_next_process_id(&self) -> u64

source

fn get_process(&self, id: u64) -> Option<Arc<dyn Process>>

source

fn add_process(&self, id: u64, proc: Arc<dyn Process>)

source

fn remove_process(&self, id: u64)

source

fn process_count(&self) -> usize

source

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

source

fn send(&self, id: u64, signal: Signal)

Implementors§