pub struct ContainerDNAT {
pub rules: Option<Vec<ContainerDNATRule>>,
}Expand description
The container-DNAT section, defining how containers can communicate with each other over non-common networks.
These rules translate traffic sent to a host address from a Docker bridge. Forwarding policy still applies to translated traffic. If forwarding between the source and destination is denied by default, allow it explicitly.
Fields§
§rules: Option<Vec<ContainerDNATRule>>An optional list of rules, see
ContainerDNATRule.
§Example
The easiest way to define the rules is using TOMLs arrays of tables:
[[container_dnat.rules]]
# first rule here
[[container_dnat.rules]]
# second rule hereTrait Implementations§
Source§impl Clone for ContainerDNAT
impl Clone for ContainerDNAT
Source§fn clone(&self) -> ContainerDNAT
fn clone(&self) -> ContainerDNAT
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 ContainerDNAT
impl Debug for ContainerDNAT
Source§impl<'de> Deserialize<'de> for ContainerDNAT
impl<'de> Deserialize<'de> for ContainerDNAT
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 ContainerDNAT
Source§impl Hash for ContainerDNAT
impl Hash for ContainerDNAT
Source§impl PartialEq for ContainerDNAT
impl PartialEq for ContainerDNAT
Source§impl Process<Iptables> for ContainerDNAT
impl Process<Iptables> for ContainerDNAT
Source§fn process(
&self,
ctx: &ProcessContext<'_, Iptables>,
) -> Result<Option<Vec<IptablesRule>>>
fn process( &self, ctx: &ProcessContext<'_, Iptables>, ) -> Result<Option<Vec<IptablesRule>>>
Process the current type within the given
ProcessContext, returning zero or more rules
to apply with nft.Source§impl Process<Nftables> for ContainerDNAT
impl Process<Nftables> for ContainerDNAT
Source§fn process(
&self,
ctx: &ProcessContext<'_, Nftables>,
) -> Result<Option<Vec<String>>>
fn process( &self, ctx: &ProcessContext<'_, Nftables>, ) -> Result<Option<Vec<String>>>
Process the current type within the given
ProcessContext, returning zero or more rules
to apply with nft.impl StructuralPartialEq for ContainerDNAT
Auto Trait Implementations§
impl Freeze for ContainerDNAT
impl RefUnwindSafe for ContainerDNAT
impl Send for ContainerDNAT
impl Sync for ContainerDNAT
impl Unpin for ContainerDNAT
impl UnsafeUnpin for ContainerDNAT
impl UnwindSafe for ContainerDNAT
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.