Skip to main content

FirewallExt

Trait FirewallExt 

Source
pub trait FirewallExt {
    // Required methods
    fn drop_traffic(&self, ips: Vec<Ipv4Addr>) -> impl Future<Output = ()>;
    fn turn_off_rules(&self) -> impl Future<Output = ()>;
}
Expand description

Extension trait for mpsc::Sender<Firewall> to provide helper methods to send messages to the Firewall actor.

Required Methods§

Source

fn drop_traffic(&self, ips: Vec<Ipv4Addr>) -> impl Future<Output = ()>

Drops traffic to the specified IP addresses.

Source

fn turn_off_rules(&self) -> impl Future<Output = ()>

Turn off all firewall rules.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FirewallExt for Sender<Firewall>

Source§

async fn drop_traffic(&self, ips: Vec<Ipv4Addr>)

Source§

async fn turn_off_rules(&self)

Implementors§