pub fn parse_reduction_operator(
op_str: &str,
) -> Result<ReductionOperator, ConversionError>
Expand description
Parse a reduction operator from a string
ยงExample
let op = parse_reduction_operator("+").unwrap();
assert_eq!(op, ReductionOperator::Add);
let op = parse_reduction_operator("min").unwrap();
assert_eq!(op, ReductionOperator::Min);