Creates a new instance of the function.
()
| 125 | impl AbsFunction { |
| 126 | /// Creates a new instance of the function. |
| 127 | pub fn new() -> Rc<Self> { |
| 128 | Rc::from(Self { |
| 129 | metadata: CallableMetadataBuilder::new("ABS") |
| 130 | .with_return_type(ExprType::Double) |
| 131 | .with_syntax(&[( |
| 132 | &[SingularArgSyntax::RequiredValue( |
| 133 | RequiredValueSyntax { |
| 134 | name: Cow::Borrowed("expr"), |
| 135 | vtype: ExprType::Double, |
| 136 | }, |
| 137 | ArgSepSyntax::End, |
| 138 | )], |
| 139 | None, |
| 140 | )]) |
| 141 | .with_category(CATEGORY) |
| 142 | .with_description("Returns the absolute value of a number.") |
| 143 | .build(), |
| 144 | }) |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | impl Callable for AbsFunction { |
nothing calls this directly
no test coverage detected