Get a specific argument by index
(&self, index: usize)
| 80 | |
| 81 | /// Get a specific argument by index |
| 82 | pub fn get_argument(&self, index: usize) -> FunctionResult<&Value> { |
| 83 | self.arguments |
| 84 | .get(index) |
| 85 | .ok_or_else(|| FunctionError::InvalidArgumentCount { |
| 86 | expected: index + 1, |
| 87 | actual: self.arguments.len(), |
| 88 | }) |
| 89 | } |
| 90 | |
| 91 | /// Get the number of arguments |
| 92 | pub fn argument_count(&self) -> usize { |