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: RuleVerdictThe 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 hereTrait Implementations§
Source§impl Clone for ContainerToHost
impl Clone for ContainerToHost
Source§fn clone(&self) -> ContainerToHost
fn clone(&self) -> ContainerToHost
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 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
impl Eq for ContainerToHost
Source§impl Hash for ContainerToHost
impl Hash for ContainerToHost
Source§impl PartialEq for ContainerToHost
impl PartialEq for ContainerToHost
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 StructuralPartialEq for ContainerToHost
Auto Trait Implementations§
impl Freeze for ContainerToHost
impl RefUnwindSafe for ContainerToHost
impl Send for ContainerToHost
impl Sync for ContainerToHost
impl Unpin for ContainerToHost
impl UnsafeUnpin 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
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.