pub struct RuleMatcher<I: Ip> {
pub from: Option<Subnet<I::Addr>>,
pub locally_generated: Option<bool>,
pub bound_device: Option<BoundInterface>,
pub mark_1: Option<Mark>,
pub mark_2: Option<Mark>,
}Expand description
The matcher part of the rule that is used to match packets.
The default matcher is the one that matches every packets, i.e., all the fields are none.
Fields§
§from: Option<Subnet<I::Addr>>Matches whether the source address of the packet is from the subnet.
locally_generated: Option<bool>Matches the packet iff the packet was locally generated.
bound_device: Option<BoundInterface>Matches the packet iff the socket that was bound to the device using
SO_BINDTODEVICE.
mark_1: Option<Mark>The matcher for the MARK_1 domain.
mark_2: Option<Mark>The matcher for the MARK_2 domain.
Trait Implementations§
impl<I: Eq + Ip> Eq for RuleMatcher<I>
Source§impl From<RuleMatcher<Ipv4>> for RuleMatcherV4
impl From<RuleMatcher<Ipv4>> for RuleMatcherV4
Source§fn from(_: RuleMatcher<Ipv4>) -> Self
fn from(_: RuleMatcher<Ipv4>) -> Self
Converts to this type from the input type.
Source§impl From<RuleMatcher<Ipv6>> for RuleMatcherV6
impl From<RuleMatcher<Ipv6>> for RuleMatcherV6
Source§fn from(_: RuleMatcher<Ipv6>) -> Self
fn from(_: RuleMatcher<Ipv6>) -> Self
Converts to this type from the input type.
impl<I: PartialEq + Ip> StructuralPartialEq for RuleMatcher<I>
Source§impl TryFrom<RuleMatcherV4> for RuleMatcher<Ipv4>
impl TryFrom<RuleMatcherV4> for RuleMatcher<Ipv4>
Auto Trait Implementations§
impl<I> Freeze for RuleMatcher<I>
impl<I> RefUnwindSafe for RuleMatcher<I>
impl<I> Send for RuleMatcher<I>
impl<I> Sync for RuleMatcher<I>
impl<I> Unpin for RuleMatcher<I>
impl<I> UnsafeUnpin for RuleMatcher<I>
impl<I> UnwindSafe for RuleMatcher<I>
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<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
impl<T, U> TryIntoExt<U> for Twhere
U: TryFromExt<T>,
type Error = <U as TryFromExt<T>>::Error
Source§fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
fn try_into_ext(self) -> Result<U, <T as TryIntoExt<U>>::Error>
Tries to perform the conversion.