[][src]Trait dfw::FirewallBackend

pub trait FirewallBackend: Sized where
    DFW<Self>: Process<Self>, 
{ type Rule; type Defaults: Debug + DeserializeOwned; fn apply(
        rules: Vec<Self::Rule>,
        ctx: &ProcessContext<'_, Self>
    ) -> Result<()>; }

This trait is used to distinguish between different firewall backends.

To add a new firewall-backend create an empty struct implementing this trait.

Associated Types

type Rule

Associated type identifying the rule-type returned.

type Defaults: Debug + DeserializeOwned

Associated type representing the firewall backend defaults/configuration.

Loading content...

Required methods

fn apply(rules: Vec<Self::Rule>, ctx: &ProcessContext<'_, Self>) -> Result<()>

Apply the processed rules.

Loading content...

Implementors

impl FirewallBackend for Iptables[src]

type Rule = IptablesRule

type Defaults = Defaults

impl FirewallBackend for Nftables[src]

type Rule = String

type Defaults = Defaults

Loading content...