Function
native_direction_to_model
(direction: NET_FW_RULE_DIRECTION)
Source from the content-addressed store, hash-verified
| 139 | } |
| 140 | |
| 141 | fn native_direction_to_model(direction: NET_FW_RULE_DIRECTION) -> Option<RuleDirection> { |
| 142 | if direction == NET_FW_RULE_DIR_IN { |
| 143 | Some(RuleDirection::Inbound) |
| 144 | } else if direction == NET_FW_RULE_DIR_OUT { |
| 145 | Some(RuleDirection::Outbound) |
| 146 | } else { |
| 147 | None |
| 148 | } |
| 149 | } |
| 150 | |
| 151 | fn model_direction_to_native(direction: &RuleDirection) -> NET_FW_RULE_DIRECTION { |
| 152 | match direction { |
Tested by
no test coverage detected