harbor run -t openthoughts/tasktrove-exp-rpt-stack-rust-v2-stack-rust-7129harbor download openthoughts/tasktrove-exp-rpt-stack-rust-v2-stack-rust-7129Implement the functionality for parsing network filter rules, NAT rules, and redirect rules based on the provided Rust test code.
Functionality Requirements:
Specific Requirements:
Implement the parse_str_to_rules function to parse filter rules. This function should:
Implement the parse_str_to_nat_rules function to parse NAT rules. This function should:
Implement the parse_str_to_rdr_rules function to parse redirect rules. This function should:
Output:
/app/ directory of the codebase.Error Handling:
Error and InvalidReason enums present in the provided code.Dependencies:
pest library for parsing as indicated in the imports of the test code.Ensure that all implementations adhere to the interfaces and expected behavior demonstrated in the provided tests. The tests should pass successfully upon completion of the task.