| 1052 | /// that's the type used throughout the execution engine. |
| 1053 | #[async_trait(?Send)] |
| 1054 | pub trait Callable { |
| 1055 | /// Returns the metadata for this function. |
| 1056 | /// |
| 1057 | /// The return value takes the form of a reference to force the callable to store the metadata |
| 1058 | /// as a struct field so that calls to this function are guaranteed to be cheap. |
| 1059 | fn metadata(&self) -> Rc<CallableMetadata>; |
| 1060 | |
| 1061 | /// Executes the callable if it is synchronous. |
| 1062 | fn exec(&self, _scope: Scope<'_>) -> CallResult<()> { |
| 1063 | unimplemented!("Must be implemented for !is_async callables") |
| 1064 | } |
| 1065 | |
| 1066 | /// Executes the callable if it is asynchronous. |
| 1067 | async fn async_exec(&self, _scope: Scope<'_>) -> CallResult<()> { |
| 1068 | unimplemented!("Must be implemented for is_async callables") |
| 1069 | } |
| 1070 | } |
no outgoing calls
no test coverage detected