pub struct HostFirewallGuard { /* private fields */ }Expand description
RAII guard for installed host firewall rules.
Dropping the guard removes only the managed table/anchor. It does not flush the host’s main firewall ruleset.
Implementations§
Source§impl HostFirewallGuard
impl HostFirewallGuard
Sourcepub const fn platform_supported() -> bool
pub const fn platform_supported() -> bool
True when this target has an implemented host firewall backend.
Sourcepub fn platform_available() -> bool
pub fn platform_available() -> bool
True when this target has an implemented backend and the required platform command is present.
Sourcepub fn install(config: &HostFirewallConfig) -> Result<Self, HostFirewallError>
pub fn install(config: &HostFirewallConfig) -> Result<Self, HostFirewallError>
Install host firewall rules for the configured mesh interface.
Returns an error on unsupported platforms or when the platform firewall command is unavailable. Callers should treat that as a hard failure before exposing the host tunnel.
Sourcepub fn cleanup_disabled_artifacts(config: &HostFirewallConfig)
pub fn cleanup_disabled_artifacts(config: &HostFirewallConfig)
Remove managed firewall artifacts without requiring a live guard.
Useful after crash/restart paths where the previous process may have died before its guard could drop.
Trait Implementations§
Source§impl Debug for HostFirewallGuard
impl Debug for HostFirewallGuard
Source§impl Drop for HostFirewallGuard
impl Drop for HostFirewallGuard
Auto Trait Implementations§
impl Freeze for HostFirewallGuard
impl RefUnwindSafe for HostFirewallGuard
impl Send for HostFirewallGuard
impl Sync for HostFirewallGuard
impl Unpin for HostFirewallGuard
impl UnsafeUnpin for HostFirewallGuard
impl UnwindSafe for HostFirewallGuard
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
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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