Struct netstack3_core::filter::Rule
source · pub struct Rule<I, DeviceClass, RuleInfo>where
I: IpExt,{
pub matcher: PacketMatcher<I, DeviceClass>,
pub action: Action<I, DeviceClass, RuleInfo>,
pub validation_info: RuleInfo,
}
Expand description
A set of criteria (matchers) and a resultant action to take if a given packet matches.
Fields§
§matcher: PacketMatcher<I, DeviceClass>
The criteria that a packet must match for the action to be executed.
action: Action<I, DeviceClass, RuleInfo>
The action to take on a matching packet.
validation_info: RuleInfo
Opaque information about this rule for use when validating and converting state provided by Bindings into Core filtering state. This is only used when installing filtering state, and allows Core to report to Bindings which rule caused a particular error. It is zero-sized for validated state.
Trait Implementations§
source§impl<I, DeviceClass, RuleInfo, IpType> GenericOverIp<IpType> for Rule<I, DeviceClass, RuleInfo>
impl<I, DeviceClass, RuleInfo, IpType> GenericOverIp<IpType> for Rule<I, DeviceClass, RuleInfo>
Auto Trait Implementations§
impl<I, DeviceClass, RuleInfo> Freeze for Rule<I, DeviceClass, RuleInfo>
impl<I, DeviceClass, RuleInfo> RefUnwindSafe for Rule<I, DeviceClass, RuleInfo>where
I: IcmpIpExt + IpProtoExt + Ip + Sealed + Sync + Send + PartialOrd + PartialEq + Ord + Hash + Eq + Default + Debug + Copy + Clone + EthernetIpExt + 'static,
RuleInfo: RefUnwindSafe,
<I as Ip>::Addr: RefUnwindSafe,
DeviceClass: RefUnwindSafe,
<I as IpProtoExt>::Proto: RefUnwindSafe,
impl<I, DeviceClass, RuleInfo> Send for Rule<I, DeviceClass, RuleInfo>
impl<I, DeviceClass, RuleInfo> Sync for Rule<I, DeviceClass, RuleInfo>
impl<I, DeviceClass, RuleInfo> Unpin for Rule<I, DeviceClass, RuleInfo>
impl<I, DeviceClass, RuleInfo> UnwindSafe for Rule<I, DeviceClass, RuleInfo>where
I: IcmpIpExt + IpProtoExt + Ip + Sealed + Sync + Send + PartialOrd + PartialEq + Ord + Hash + Eq + Default + Debug + Copy + Clone + EthernetIpExt + 'static,
RuleInfo: UnwindSafe + RefUnwindSafe,
<I as Ip>::Addr: UnwindSafe + RefUnwindSafe,
DeviceClass: UnwindSafe + RefUnwindSafe,
<I as IpProtoExt>::Proto: UnwindSafe + RefUnwindSafe,
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
impl<Id, CC, BC> TimerHandler<BC, Id> for CCwhere
Id: HandleableTimer<CC, BC>,
source§fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
fn handle_timer(&mut self, bindings_ctx: &mut BC, id: Id)
Handle a timer firing.