Struct dfw::types::ContainerToHost
source · pub struct ContainerToHost {
pub default_policy: RuleVerdict,
pub rules: Option<Vec<ContainerToHostRule>>,
}
Expand description
The container-to-host section, defining how containers can communicate with the host.
Fields§
§default_policy: RuleVerdict
The default_policy
defines the default for when there is not a specific rule.
rules: Option<Vec<ContainerToHostRule>>
An optional list of rules, see
ContainerToHostRule
.
Example
The easiest way to define the rules is using TOMLs arrays of tables:
[container_to_host]
default_policy = "drop"
[[container_to_host.rules]]
# first rule here
[[container_to_host.rules]]
# second rule here
Trait Implementations§
source§impl Clone for ContainerToHost
impl Clone for ContainerToHost
source§fn clone(&self) -> ContainerToHost
fn clone(&self) -> ContainerToHost
Returns a copy of the value. Read more
1.0.0 · 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 ContainerToHost
impl Debug for ContainerToHost
source§impl<'de> Deserialize<'de> for ContainerToHost
impl<'de> Deserialize<'de> for ContainerToHost
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
source§impl Hash for ContainerToHost
impl Hash for ContainerToHost
source§impl PartialEq for ContainerToHost
impl PartialEq for ContainerToHost
source§fn eq(&self, other: &ContainerToHost) -> bool
fn eq(&self, other: &ContainerToHost) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Process<Iptables> for ContainerToHost
impl Process<Iptables> for ContainerToHost
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 ContainerToHost
impl Process<Nftables> for ContainerToHost
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 Eq for ContainerToHost
impl StructuralEq for ContainerToHost
impl StructuralPartialEq for ContainerToHost
Auto Trait Implementations§
impl RefUnwindSafe for ContainerToHost
impl Send for ContainerToHost
impl Sync for ContainerToHost
impl Unpin for ContainerToHost
impl UnwindSafe for ContainerToHost
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
§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.