| 108 | } |
| 109 | |
| 110 | pub trait ScriptEngine { |
| 111 | type Expr; |
| 112 | |
| 113 | fn process_script(&mut self, expression: Expression<Self::Expr>) -> Expression<Self::Expr>; |
| 114 | fn execute(&mut self, expression: Expression<Self::Expr>) -> Result<String, Error>; |
| 115 | fn parse(&mut self, script: Script) -> Result<Expression<Self::Expr>, Error>; |
| 116 | fn empty() -> &'static str; |
| 117 | |
| 118 | fn initialize( |
| 119 | &mut self, |
| 120 | env_script: String, |
| 121 | env: String, |
| 122 | snapshot_script: String, |
| 123 | ) -> Result<(), Error>; |
| 124 | |
| 125 | fn snapshot(&mut self) -> Result<String, Error>; |
| 126 | } |
| 127 | |
| 128 | impl<E, T: ScriptEngine<Expr = E>> Processable<T> for Value<Unprocessed> { |
| 129 | type Output = Value<Processed>; |
nothing calls this directly
no outgoing calls
no test coverage detected