(&mut self, name: &str, value: F)
| 196 | } |
| 197 | |
| 198 | pub fn add_function<T: 'static, F>(&mut self, name: &str, value: F) |
| 199 | where |
| 200 | F: IntoFunction<T> + 'static + Send + Sync, |
| 201 | { |
| 202 | if let Context::Root { functions, .. } = self { |
| 203 | functions.add(name, value); |
| 204 | }; |
| 205 | } |
| 206 | |
| 207 | pub fn resolve(&self, expr: &Expression) -> Result<Value, ExecutionError> { |
| 208 | Value::resolve(expr, self) |