pub struct PolicyRule {
pub from: String,
pub to: String,
pub ports: Vec<u16>,
pub protocol: String,
pub action: PolicyAction,
}Expand description
A network policy rule that allows traffic between specific boxes or ports.
Fields§
§from: StringSource box name pattern (e.g., “web”, “*” for any).
to: StringDestination box name pattern (e.g., “db”, “*” for any).
ports: Vec<u16>Allowed ports (empty = all ports).
protocol: StringProtocol: “tcp”, “udp”, or “any” (default).
action: PolicyActionRule action: allow or deny.
Trait Implementations§
Source§impl Clone for PolicyRule
impl Clone for PolicyRule
Source§fn clone(&self) -> PolicyRule
fn clone(&self) -> PolicyRule
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 PolicyRule
impl Debug for PolicyRule
Source§impl<'de> Deserialize<'de> for PolicyRule
impl<'de> Deserialize<'de> for PolicyRule
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
Auto Trait Implementations§
impl Freeze for PolicyRule
impl RefUnwindSafe for PolicyRule
impl Send for PolicyRule
impl Sync for PolicyRule
impl Unpin for PolicyRule
impl UnsafeUnpin for PolicyRule
impl UnwindSafe for PolicyRule
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