pub struct Initialization {
pub v4: Option<HashMap<String, Vec<String>>>,
pub v6: Option<HashMap<String, Vec<String>>>,
}Expand description
The initialization section allows you to add custom rules to any table in both iptables and ip6tables.
§Example
[initialization.v4]
filter = [
"-P INPUT DROP",
"-F INPUT",
]
[initialization.v6]
nat = [
"-P PREROUTING DROP",
]Fields§
§v4: Option<HashMap<String, Vec<String>>>Initialization rules for iptables (IPv4). Expects a map where the key is a specific table and the value is a list of rules.
§Example
[initialization.v4]
filter = [
"-P INPUT DROP",
"-F INPUT",
]v6: Option<HashMap<String, Vec<String>>>Initialization rules for ip6tables (IPv6). Expects a map where the key is a specific table and the value is a list of rules.
§Example
[initialization.v6]
nat = [
"-P PREROUTING DROP",
]Trait Implementations§
Source§impl Clone for Initialization
impl Clone for Initialization
Source§fn clone(&self) -> Initialization
fn clone(&self) -> Initialization
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Initialization
impl Debug for Initialization
Source§impl<'de> Deserialize<'de> for Initialization
impl<'de> Deserialize<'de> for Initialization
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Initialization
Source§impl PartialEq for Initialization
impl PartialEq for Initialization
impl StructuralPartialEq for Initialization
Auto Trait Implementations§
impl Freeze for Initialization
impl RefUnwindSafe for Initialization
impl Send for Initialization
impl Sync for Initialization
impl Unpin for Initialization
impl UnsafeUnpin for Initialization
impl UnwindSafe for Initialization
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.