1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This is free and unencumbered software released into the public domain.

use crate::{
    prelude::{Box, Rc},
    Block, BlockResult, Process, System, Transport,
};

pub trait Runtime {
    //fn execute<T: Block + 'static>(&mut self, block: T) -> BlockResult<Rc<dyn Process>> {
    //    self.execute_block(Box::new(block))
    //}

    fn execute_block(&mut self, block: Box<dyn Block>) -> BlockResult<Rc<dyn Process>>;

    fn execute<X: Transport + Default>(
        &mut self,
        system: System<X>,
    ) -> BlockResult<Rc<dyn Process>>;
}