Struct dfw::types::ContainerToHostRule
source · pub struct ContainerToHostRule {
pub network: String,
pub src_container: Option<String>,
pub matches: Option<String>,
pub verdict: RuleVerdict,
}
Expand description
Definition for a rule to be used in the container-to-host section.
Fields§
§network: String
Network of the source container to apply the rule to.
src_container: Option<String>
Source container to apply the rule to.
matches: Option<String>
Additional match-string, which will be added to the nftables command.
verdict: RuleVerdict
Verdict for rule (accept, drop or reject).
Trait Implementations§
source§impl Clone for ContainerToHostRule
impl Clone for ContainerToHostRule
source§fn clone(&self) -> ContainerToHostRule
fn clone(&self) -> ContainerToHostRule
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 ContainerToHostRule
impl Debug for ContainerToHostRule
source§impl<'de> Deserialize<'de> for ContainerToHostRule
impl<'de> Deserialize<'de> for ContainerToHostRule
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 ContainerToHostRule
impl Hash for ContainerToHostRule
source§impl PartialEq for ContainerToHostRule
impl PartialEq for ContainerToHostRule
source§fn eq(&self, other: &ContainerToHostRule) -> bool
fn eq(&self, other: &ContainerToHostRule) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Process<Iptables> for ContainerToHostRule
impl Process<Iptables> for ContainerToHostRule
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 ContainerToHostRule
impl Process<Nftables> for ContainerToHostRule
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 ContainerToHostRule
impl StructuralEq for ContainerToHostRule
impl StructuralPartialEq for ContainerToHostRule
Auto Trait Implementations§
impl RefUnwindSafe for ContainerToHostRule
impl Send for ContainerToHostRule
impl Sync for ContainerToHostRule
impl Unpin for ContainerToHostRule
impl UnwindSafe for ContainerToHostRule
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.