(value: BSTR)
| 130 | } |
| 131 | |
| 132 | fn bstr_to_option(value: BSTR) -> Result<Option<String>, FirewallError> { |
| 133 | let text = value.to_string(); |
| 134 | if text.is_empty() { |
| 135 | Ok(None) |
| 136 | } else { |
| 137 | Ok(Some(text)) |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | fn native_direction_to_model(direction: NET_FW_RULE_DIRECTION) -> Option<RuleDirection> { |
| 142 | if direction == NET_FW_RULE_DIR_IN { |
no test coverage detected