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: StringNetwork 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: RuleVerdictVerdict 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 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 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
impl Eq for ContainerToHostRule
Source§impl Hash for ContainerToHostRule
impl Hash for ContainerToHostRule
Source§impl PartialEq for ContainerToHostRule
impl PartialEq for ContainerToHostRule
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 StructuralPartialEq for ContainerToHostRule
Auto Trait Implementations§
impl Freeze for ContainerToHostRule
impl RefUnwindSafe for ContainerToHostRule
impl Send for ContainerToHostRule
impl Sync for ContainerToHostRule
impl Unpin for ContainerToHostRule
impl UnsafeUnpin 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
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.