MCPcopy Create free account
hub / github.com/PowerShell/DSC / native_direction_to_model

Function native_direction_to_model

resources/windows_firewall/src/firewall.rs:141–149  ·  view source on GitHub ↗
(direction: NET_FW_RULE_DIRECTION)

Source from the content-addressed store, hash-verified

139}
140
141fn 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
151fn model_direction_to_native(direction: &RuleDirection) -> NET_FW_RULE_DIRECTION {
152 match direction {

Callers 1

rule_to_modelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected