pub struct Rule {
pub direction: Direction,
pub destination: Destination,
pub protocols: Vec<Protocol>,
pub ports: Vec<PortRange>,
pub action: Action,
}Expand description
A single egress/ingress policy rule. Evaluated first-match-wins per direction.
Fields§
§direction: DirectionDirection this rule applies to.
destination: DestinationDestination filter (direction-dependent interpretation).
protocols: Vec<Protocol>Protocol set; empty matches any protocol.
ports: Vec<PortRange>Guest-side port-range set; empty matches any port.
action: ActionAction to take on a match.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rule
impl<'de> Deserialize<'de> for Rule
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 Rule
impl StructuralPartialEq for Rule
Auto Trait Implementations§
impl Freeze for Rule
impl RefUnwindSafe for Rule
impl Send for Rule
impl Sync for Rule
impl Unpin for Rule
impl UnsafeUnpin for Rule
impl UnwindSafe for Rule
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