pub struct FwRule {
pub enabled: bool,
pub inbound: bool,
pub allow: bool,
pub profiles: u32,
pub program: Option<String>,
pub proto: Proto,
pub local_ports: PortSpec,
pub remote: Remote,
pub local_addresses: LocalScope,
pub interface_scoped: bool,
pub restricted: bool,
}Expand description
One firewall rule, with the fields that decide whether it affects us.
Fields§
§enabled: bool§inbound: bool§allow: bool§profiles: u32NET_FW_PROFILE2_* bitmask; Windows uses 0x7FFFFFFF for “all”.
program: Option<String>The program the rule is bound to, None for any program.
proto: Proto§local_ports: PortSpec§remote: Remote§local_addresses: LocalScopeWhich of our own addresses the rule applies to.
interface_scoped: boolRestricted to particular adapters or interface types. Such a rule may not cover the adapter we care about, so it is skipped rather than assumed.
restricted: boolBound to something other than a program path: a Windows service, a Store
app package (LocalAppPackageId), particular users or machines, or secure
(authenticated) traffic only. Such a rule has an empty program path and
looks like “any program”, which it is not. Found on narko, 2026-10-01: 25
Store-app rules (“Solitaire”, “Microsoft Store”, …) made coverage look
complete for a binary no rule named. Skipped, never assumed to apply.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FwRule
impl RefUnwindSafe for FwRule
impl Send for FwRule
impl Sync for FwRule
impl Unpin for FwRule
impl UnsafeUnpin for FwRule
impl UnwindSafe for FwRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more