protoflow_core/
runtime.rs

1// This is free and unencumbered software released into the public domain.
2
3use crate::{
4    prelude::{Box, Rc},
5    Block, BlockResult, Process, System, Transport,
6};
7
8pub trait Runtime {
9    //fn execute<T: Block + 'static>(&mut self, block: T) -> BlockResult<Rc<dyn Process>> {
10    //    self.execute_block(Box::new(block))
11    //}
12
13    fn execute_block(&mut self, block: Box<dyn Block>) -> BlockResult<Rc<dyn Process>>;
14
15    fn execute<X: Transport + Default>(
16        &mut self,
17        system: System<X>,
18    ) -> BlockResult<Rc<dyn Process>>;
19}