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);
}