pub struct ContainerToWiderWorld {
pub default_policy: RuleVerdict,
pub rules: Option<Vec<ContainerToWiderWorldRule>>,
}Expand description
The container-to-wider-world section, defining how containers can communicate with the wider world.
Fields§
§default_policy: RuleVerdictThe default_policy defines the default for when there is not a specific rule.
rules: Option<Vec<ContainerToWiderWorldRule>>An optional list of rules, see
ContainerToWiderWorldRule.
§Example
The easiest way to define the rules is using TOMLs arrays of tables:
[container_to_wider_world]
default_policy = "drop"
[[container_to_wider_world.rules]]
# first rule here
[[container_to_wider_world.rules]]
# second rule hereTrait Implementations§
Source§impl Clone for ContainerToWiderWorld
impl Clone for ContainerToWiderWorld
Source§fn clone(&self) -> ContainerToWiderWorld
fn clone(&self) -> ContainerToWiderWorld
Returns a duplicate 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 ContainerToWiderWorld
impl Debug for ContainerToWiderWorld
Source§impl<'de> Deserialize<'de> for ContainerToWiderWorld
impl<'de> Deserialize<'de> for ContainerToWiderWorld
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 ContainerToWiderWorld
impl Hash for ContainerToWiderWorld
Source§impl PartialEq for ContainerToWiderWorld
impl PartialEq for ContainerToWiderWorld
Source§impl Process<Iptables> for ContainerToWiderWorld
impl Process<Iptables> for ContainerToWiderWorld
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 ContainerToWiderWorld
impl Process<Nftables> for ContainerToWiderWorld
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 ContainerToWiderWorld
impl StructuralPartialEq for ContainerToWiderWorld
Auto Trait Implementations§
impl Freeze for ContainerToWiderWorld
impl RefUnwindSafe for ContainerToWiderWorld
impl Send for ContainerToWiderWorld
impl Sync for ContainerToWiderWorld
impl Unpin for ContainerToWiderWorld
impl UnwindSafe for ContainerToWiderWorld
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.