A function that can be invoked.
| 137 | |
| 138 | /// A function that can be invoked. |
| 139 | pub trait Function { |
| 140 | /// Invoke the function. |
| 141 | /// |
| 142 | /// # Arguments |
| 143 | /// |
| 144 | /// * `args` - The arguments to the function. |
| 145 | /// |
| 146 | /// # Errors |
| 147 | /// |
| 148 | /// This function will return an error if the function fails to execute. |
| 149 | fn invoke(&self, args: &[Value], context: &Context) -> Result<Value, DscError>; |
| 150 | fn get_metadata(&self) -> FunctionMetadata; |
| 151 | } |
| 152 | |
| 153 | /// A dispatcher for functions. |
| 154 | pub struct FunctionDispatcher { |
no outgoing calls
no test coverage detected